Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Validating a value list without the use of standard field validation


This topic is 8284 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I have a database which has a field with a pull-down menu with a very long list of schools that comes from a pre-defined value list. For reasons too long to go into in my short post, I cannot use field validations anywhere in my database so I have been forced to validate each field with a script. I have been using techniques such as "not IsBlank (myfield)" or "Length (myfield) = 12", etc. and it has worked without any problem. I need to know; however, if there is a way to check to make certain that the entry is from the list of schools provided using a script method because, again, I cannot use the standard field validation. I would consider hard-coding a list of schools in the script, but the list contains several hundred values which is likely to change from time to time so I would prefer having the program simply refer back to my pre-defined value list for validation. Does anyone have a good suggestion for doing this?

Posted

An imperfect-but-pretty-durn-good solution:

In the file called "DB_Name":

You have the TextField, which is the data entry field.

You also have a Value List (here called "Text")

Create a ValueList field, a calc field:

ValueListItems("DB_Name", "Text")

Create a Validation field, another calc field:

If(PatternCount(ValueList, TextField) > 0, "", "NoGood")

This will return nothing if the contents of the TextField are contained within the Value List, but if not, you'll see a "NoGood".

HTH,

Dan

This topic is 8284 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.