Rockxyzzy Posted June 28, 2004 Posted June 28, 2004 Gang- I have a db that requires the user to enter a Client ID in a dialog that is part of a script. When the user enters a Client ID (unique number), I want to compare this entered value with all the Client IDs in a related table to verify that the user has entered a valid Client ID number. Right now, I have the script switching to the Client ID table, and using a loop to parse the ID field of each record for a match, reporting if no match is found. This seems horribly inefficient. The Client IDs are indexed. Can I script a direct search of the indexed Client ID values? Or should I do a scripted "Find" command and use the results of the Find to learn if a matching Client ID exists? It looks like the Edit Find Request field in the Scripts section requires that I enter a specific find criteria at the point of authoring. I tried to script a find command, but it wasn't clear how to use a user-entered value as the Find criteria. I would welcome any guidance you can offer. Thanks!
andygaunt Posted June 28, 2004 Posted June 28, 2004 Can you use an If [ not IsValid (Your relationship::ClientID) ] Show your error here End If # Continue with script here as a valid ID exists.
Rockxyzzy Posted June 29, 2004 Author Posted June 29, 2004 This did it! Thank you. I didn't gather from the online Help description of the IsValid function that it would work in this way. Thank you for enlightening me about it.
Recommended Posts
This topic is 7456 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 accountSign in
Already have an account? Sign in here.
Sign In Now