Jump to content

Sub for value List in Scripted validation


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

Recommended Posts

In a very complex Invoice validation situation, I need to avoid all field-level validation. Therefore, I am collecting and validating all the data by script. One of many validation parameters is:

The part number entered in the temporary gPart# field must be a number contained in a field in the Parts database.

In field-level validation this would be easy. But in a script, how can I say something like:

If(Part# is not a member of Parts::Part#),

ShowMessage [This is not a valid number]

End If

I can't find anything in the manual that I could do, short of scripting a full-on Find request and error message collection.

Link to comment
Share on other sites

If you are collecting data into global fields and validating those prior to writing the data to a record, I assume that you are doing so on the request of a user to add an item to the invoice? If so do not let the user proceede until ALL validation errors are cleared up.

As soon as you find an error, simply alert the user and return them to the editing screen so that they can correct the error.

Link to comment
Share on other sites

Yes, this is the case. I have the user fill out all the temp fields, then hit an "add" button which triggers the validation script. For the part number field, I want that script to validate part numbers by scanning the parts inventory database and triggering an error message if not found. What is the best way to do this?

Link to comment
Share on other sites

This topic is 8297 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.