Alpha Video Training
Results 1 to 5 of 5

Thread: Validation of more than 1

  1. #1
    Member Wexler's Avatar
    Real Name
    John Wexler
    Join Date
    Feb 2004
    Location
    Minneapolis/Brooklyn Park,MN
    Posts
    13

    Default Validation of more than 1

    I have a custom validation that says Precinct = "E5".

    How do I do that for e5 or e6 or C1 or W3...

    How do I do that in custom valications or just insure that they are putting in a Valid precinct.

  2. #2
    Volunteer Moderator Steve Workings's Avatar
    Real Name
    Steve Workings
    Join Date
    Apr 2000
    Location
    The Dreaded Chair
    Posts
    5,630

    Default RE: Validation of more than 1

    I'm not sure I understand what you're doing -- your explanation is kinda sketchy. However, I'm wondering if your solution might be to put the list of precincts in a table, make it a lookup table in field rules, then force the closest match (or select another appropriate rule that works for you).

    - Steve

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

    Default RE: Validation of more than 1

    Steve's response is the best advice. To answer your question more directly, if less advisably....

    Precinct = "E5" .or. Precinct = "e6" .or. Precinct = "C1" .or. Precinct = "W3"

    or

    inlist(Precinct,"E5","e6","C1","W3")

    The first version could be repeated up to the 1024 character limit for expressions, the second for up to 25 matche possibilities ("e5", etc).

  4. #4
    Member Wexler's Avatar
    Real Name
    John Wexler
    Join Date
    Feb 2004
    Location
    Minneapolis/Brooklyn Park,MN
    Posts
    13

    Default RE: Validation of more than 1

    Stan,

    Thanks for the tips. I like both yours and Steve Workings ideas. Two ways to accomplish the same thing. I had tried the Precinct = routine but I didn't have the syntax down quiet right. After seeing your example, its a piece of cake.

    I am alson learning the use of inlist, something I have never used before. Thats a real time saver.


    Again Thanks

    John Wexler

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

    Default RE: Validation of more than 1

    Steve's version is the more advisable because you can easily devise a form or browse to allow the user to maintain the list of precincts. Merely allow the user to edit the table.

    If you hard-code the list of pricincts into one of the expressions, someone must edit the expression to change the list.

Similar Threads

  1. validation error help please
    By randygreen in forum Web Application Server v6
    Replies: 3
    Last Post: 05-16-2005, 03:18 AM
  2. Validation Expression(s)
    By Larry F. Carraher in forum Alpha Five Version 4
    Replies: 5
    Last Post: 07-29-2002, 07:02 AM
  3. More validation problemss
    By Martin in forum Alpha Five Version 4
    Replies: 5
    Last Post: 06-19-2002, 11:48 AM
  4. validation question
    By Mike Reed in forum Alpha Five Version 4
    Replies: 1
    Last Post: 07-31-2000, 02:43 PM
  5. Validation rule help
    By Chris Knapp in forum Alpha Five Version 4
    Replies: 13
    Last Post: 05-23-2000, 05:59 PM

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
  •