| Command group | Flag affected | Reversible | Execute on client | Platform(s) |
| Finding data | YES | NO | NO | All |
This command tests the specified indexed field for a unique value. The flag is set if the current field value is a unique index value, and cleared if the value duplicates an existing index value. In a multi-user situation, no account is made of field values in records held by other work stations which are not yet updated to disk.
You use Test for a unique index value before storing a new value in a file. In the following example, the proposed new part number is tested against the existing file.
# Insert account AC05 if it does not already exist
Set main filefAccounts
Prepare for insert
CalculatefAccounts.Codeas'AC05'Test for a unique index valueonfAccounts.Code
If flag trueUpdate files
End If