Enforcing unique numbering
-
- UpdatedFeb 2, 2023
- 1 minute read
- Utah
- Platform Field Administration
The Utah release is no longer supported. As such, the product documentation and release notes are provided for informational purposes only, and will not be updated.
Although duplicate numbers are rare, numbering does not enforce uniqueness, by default.
To enforce uniqueness, you can:
- Create a before business rule on insert only to check for duplicate values and replace duplicates with the next available number.
- Enable a unique index on the table.
Note: While unique indexes ensure data integrity they also prevent any insert involving a
duplicate number. This may cause unexpected errors during data entry.
Sample business rule
This sample script can be used as part of a before business rule on insert only to check for duplicate numbers and replace them with the next available number. The following script references a script created in Configure left padding of a system number in a table.