finding any duplicates upon exiting a field
I have a field that once exited I would like to have a script run and let me know if the text in the field has already been used. Help
Define a SelfJoin by making a new occurrence of your table and relating them by your text field:
YourTable::TextField = YourTable 2::textField
An OnObjectExit or OnObjectSave script can then use this relationship to check for duplicate values:
If [Count ( YourTable 2::textField ) > 1 ], then this record is not the first record to store that value in this text field.
This assumes that their are no return characters in your text field. If returns are permitted, a different approach would be needed here.
You could change the validation in the field's definition to be unique, that will give you an error message if you enter a duplicate value. You can choose to let the user override this validation if you just want a warning.
Retrieving data ...