Alpha Video Training
Results 1 to 8 of 8

Thread: Field Validation

  1. #1
    richard dymond
    Guest

    Default Field Validation

    Hi,

    Recently started developing with Alpha 5 V6 having come from a background in Oracle and am really tearing my hair out with this simple problem!!

    Basically, in a browse layout all I want to do is validate that a field can only contain characters in "123456789,-"

    So, valid entries for that field could be "1,3-9,6" or "5,8,10,12-16" etc. etc.

    I've developed a logical function to return true or false in this scenario, but I simply cannot get it to work when using the expression builder in Field rules for custom validation.

    Is this the right place to do this?

    Many thanks,

    Richard

  2. #2
    "Certified" Alphaholic
    Real Name
    JohnZaleski
    Join Date
    Oct 2000
    Posts
    1,736

    Default RE: Field Validation

    Does your validation work in the form mode you can try using the default form?
    it also might help if you showed the ecact validation expression ued.

  3. #3
    richard dymond
    Guest

    Default RE: Field Validation

    Thanks for the info - in doing what you said I managed to determine where the problem was - I'd set the field validation rule on the table field, rather than the set field (which form was based). I naively assumed that the field custom validation rules would be duplicated on both table and set!!

    Anyway, still have another problem - if I create a form over the table, my customised validation error message appears ok, but if I use the form over the set - I get an unhelpful 'Field value not valid: fieldname' error.

    Any ideas on this??

    Thanks

  4. #4
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default RE: Field Validation

    In a set based form you probably need to reference a child table with

    childtablename-"fieldname

  5. #5
    richard dymond
    Guest

    Default RE: Field Validation

    Sorry probably didn't make it clear...

    In the field rules for the set, I have added a custom validation function which returns True or False, and have put a customised error message to appear if the validation fails. However, when I run my form over the set - the validation correctly determines whether the field is valid or not, but I do not get my customised error message. I simply get the 'Field value not valid: fieldname' message instead.

  6. #6
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default RE: Field Validation

    " I do not get my customised error message" - the expression for which is???????????????????

  7. #7
    Volunteer Moderator
    Real Name
    Alan Buchholz
    Join Date
    Oct 2000
    Location
    Delavan, Wisconsin
    Posts
    9,657

    Default RE: Field Validation



    richard dymond wrote:
    -------------------------------
    ... I naively assumed that the field custom validation rules would be duplicated on both table and set!!

    That is what happens. Field rules only exist at the table level. You can edit them from the set, but they are applying at the table level... Make a change from the set and you'll see the same change from editing on the table.... Something else is going on.

    btw, Welcome to the Alpha world.

  8. #8
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default RE: Field Validation

    I'm assuming you have some customized message which specifies a field value?

Similar Threads

  1. Field Validation - double entry
    By Tom Patten in forum Alpha Four Version 6 and Prior
    Replies: 1
    Last Post: 05-20-2005, 11:53 AM
  2. Form field validation problem
    By Imran Ahmad in forum Web Application Server v6
    Replies: 3
    Last Post: 02-25-2005, 03:36 PM
  3. Conditional validation in field rules
    By Tommy in forum Alpha Five Version 4
    Replies: 2
    Last Post: 04-09-2002, 07:09 AM
  4. validation field rule
    By Becky McNichols in forum Alpha Five Version 4
    Replies: 5
    Last Post: 02-03-2002, 06:58 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
  •