innodes Posted June 20, 2008 Posted June 20, 2008 I have layouts using global fields as data input tools. When the user is ready, it creates a new record in the correct location and popluates the various fields from the globals. The rub is that I need to validate (unique value) the global against the existing data to prevent duplication. Is there a way to set the global's validate from something that will look at the existing data? I am thinking of something like this (but don't think this syntax is right) isValid (global::abbr_g ≠ data::abbr) Would that check for a unique input? thanks
mr_vodka Posted June 20, 2008 Posted June 20, 2008 There are a few different ways to check this. Here is one. If you create a relationship keyed on global::abbr_g = data::abbr, you can check it via a valid relationship. IsEmpty ( data::abbr )
innodes Posted June 23, 2008 Author Posted June 23, 2008 Thanks, but how do you do the check? I don't see anyway to place a calc into the Edit Relationship window. That might be a handy tool.
mr_vodka Posted June 23, 2008 Posted June 23, 2008 If you are using a script to create the new record, then why dont you just check it there?
innodes Posted June 24, 2008 Author Posted June 24, 2008 To answer your script question, I was a bit unclear at the beginning I think. Those global fields are in a unique "input layout". The script needs to check the validity of some of the inputs before it commits the new record. I think it needs to check and validate at the point the user is trying to add it into the specific fields in the input layout as opposed to when the record (with multiple field entries) is being committed. That is why I was trying to do it that way, I'm I off on this? thanks
mr_vodka Posted June 24, 2008 Posted June 24, 2008 If you have a bunch of global fields where they enter in data, it doesnt really matter on the commit. You can provide your checks and validation as part of your script before writing any of the data into the data table itself. If it fails any of your checks you would prompt the user.
Recommended Posts
This topic is 5994 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