pdbe Posted August 8, 2007 Posted August 8, 2007 I want to add a field validation which says that only one record in the database is allowed to have the value 'YES' in the field (or no record has the value 'YES') and all the others must be 'NO'. Can this be done using a calculation to validate the field? Thanks in anticipation.
Søren Dyhr Posted August 8, 2007 Posted August 8, 2007 No define the field as number, and format is as boolean. Then attach a script when you define the field as an invisible button as well. This script contains just one line: Set Field [ myYesNo; Mod(myYesNo + 1;2) ] This script toggles the value between the two layout options you have entered in the formatting of the number. Whether or not you should need a default value in the field is down to your requirements, but if it's so, make an autoenter value either 0 or 1... --sd
Recommended Posts
This topic is 6377 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