How can I check that the values of an attribute of an object for uniqueness?
I want to do this at entry time mostly.
thanks,
Terry
Checking for uniqueness
-
- Posts: 595
- Joined: Sun Apr 24, 2005 2:22 am
- Contact:
Terry,
Here is the 'Uniqueness of login name' rule that the system automatically adds to RegularUser when you create a new business space:
If EXISTS SystemUser WHERE (SystemUser.LoginName = ThisRegularUser.LoginName
AND SystemUser.ID<>ThisRegularUser.ID)
Then REPORT ERROR 'User with this login name already exists. Please choose a different name'
You can add a similarly structured rule to your objects to check attribute values for uniqueness. If you specifically want to limit the check to entry-time only, you can add condition IS NEW to the rule.
Here is the 'Uniqueness of login name' rule that the system automatically adds to RegularUser when you create a new business space:
If EXISTS SystemUser WHERE (SystemUser.LoginName = ThisRegularUser.LoginName
AND SystemUser.ID<>ThisRegularUser.ID)
Then REPORT ERROR 'User with this login name already exists. Please choose a different name'
You can add a similarly structured rule to your objects to check attribute values for uniqueness. If you specifically want to limit the check to entry-time only, you can add condition IS NEW to the rule.
Aware IM Support Team