Alpha Video Training
Results 1 to 5 of 5

Thread: Grid component field validation (date field)?

  1. #1
    Member Hansolo's Avatar
    Real Name
    Chuck Tanner
    Join Date
    Feb 2005
    Location
    North Carolina
    Posts
    351

    Default Grid component field validation (date field)?

    Can anyone show me a custom field validation for a date field that will allow either an empty (blank) field or a range to be Added to a table?

    This is part of my same old problem with the Grid Component Field Validation dialog except now with a date field. Setting Require Value to False and then using a Simple Expression to validate entered data does not work because it will not allow the empty field despite explicitly setting Require Value to False.

    For a numeric field I am forced to use a custom expression like the following which works to allow a blank field or the constraint:

    CurrentValue = "" .or. val(CurrentValue) > 1 .and. val(CurrentValue) < 10

    But for a date field the following custom expression will not allow a blank field.

    CurrentValue = "" .or. ctod(CurrentValue) > {01/01/03} .and. ctod(CurrentValue) < {01/01/08}

    Thanks for any help.

    Chuck

  2. #2
    Member
    Real Name
    Jim Brown
    Join Date
    Jun 2000
    Location
    Wellington, FL
    Posts
    117

    Default

    Quote Originally Posted by Hansolo
    But for a date field the following custom expression will not allow a blank field.

    CurrentValue = "" .or. ctod(CurrentValue) > {01/01/03} .and. ctod(CurrentValue) < {01/01/08}

    Thanks for any help.

    Chuck
    This should work.

    ctod(CurrentValue) = {} .or. ctod(CurrentValue) > {01/01/03} .and. ctod(CurrentValue) < {01/01/08}

  3. #3
    Member Hansolo's Avatar
    Real Name
    Chuck Tanner
    Join Date
    Feb 2005
    Location
    North Carolina
    Posts
    351

    Default

    Thanks for the reply but that does not work in my case. See attached screen shot. Did you get this to work on your end?

  4. #4
    Member
    Real Name
    Jim Brown
    Join Date
    Jun 2000
    Location
    Wellington, FL
    Posts
    117

    Default

    Mmmmm, in the expression builder it evaluates out to true, but in the field validation window test it says "Value is not a valid date value".



    Jim

  5. #5
    Former Alpha Employee Edward Larrabee's Avatar
    Real Name
    Edward Larrabee
    Join Date
    Nov 2002
    Location
    New Hampshire
    Posts
    1,385

    Default

    This will be fixed in the next patch.

Similar Threads

  1. Getting a little frustrated with field validation in web grid componets.
    By Hansolo in forum Web Application Server v7
    Replies: 5
    Last Post: 01-18-2006, 05:21 PM
  2. Calculated field in grid component: refresh ?
    By mronck in forum Web Application Server v7
    Replies: 0
    Last Post: 11-19-2005, 12:37 PM
  3. Field Validation
    By richard dymond in forum Alpha Five Version 6
    Replies: 7
    Last Post: 09-21-2005, 05:14 AM
  4. Custom validation on a date field won't work
    By brett s in forum Alpha Five Version 5
    Replies: 12
    Last Post: 10-27-2004, 09:01 PM
  5. Field Validation
    By bobsk in forum Alpha Five Version 4
    Replies: 1
    Last Post: 01-07-2002, 03:06 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •