Use Unique for fields where each employee must have their own value, such as a badge number, a biometric device ID or a tax number. Once a field is unique, OrangeHRM stops anyone from saving a value that another employee, current or past, already has.
To make an existing custom field unique
Step 1 - Go to Employee Management > More > Configuration > Custom Fields Section.
Step 2 - Open the section that holds the field.
Step 3 - Click the configure icon next to the field. The Edit Custom Field window opens.
Step 4 - Select the Unique checkbox. A message appears under the checkboxes explaining what Unique does.
Step 5 - Click Save. The Unique column in the list of custom fields now shows Yes for this field.
When you select Unique, this message appears: Each value can be used only once and cannot be repeated for any employee, including past employees.
When you make an existing field unique, a second sentence is added: This field may already contain duplicate values. Existing records will not be changed, but all new entries and updates must be unique.
Note: Making an existing field unique does not change or remove values that employees already have, even if some are duplicates. Only new values and changes to existing values are checked.
What happens when a value is already in use
If someone enters a value that another employee already has, the message This value is already in use appears under the field. The record cannot be saved until a different value is entered.
- The check includes past employees, so a value used by a terminated employee cannot be reused.
- Capital and small letters are treated the same, so ABC123 and abc123 count as the same value.
- Spaces at the start or end of a value are ignored, so ABC123 and ABC123 with a trailing space count as the same value.
- The check works on every screen where the field appears, including custom tabs and the Add Employee wizard.
- On a custom tab that can hold many records, the same employee also cannot repeat a value across their own rows.
Note: When employee data is uploaded in bulk, a row with a value that is already in use for a unique field is rejected.