Unique-valued fields Registry entries
Specifies that a column or a combination of columns must be unique in order to save a record, and a message to be displayed if uniqueness is violated:
|
|
Specifies that one or more columns is unique:
|
In general, unless you are looking to enable uniqueness checking and auto-incrementation of a value in a field, it is recommended that you use the Unique Registry entry to specify the uniqueness of columns.
With the Unique Registry entry it is possible to specify that a combination of columns is unique in order to save a record. For example, if a unique combination of three columns is required to save a record, two records can share two of the three values, as long as the third value is different. If the combination of Field1, Field2, and Field3 must be unique, these two records could be saved:
Record 1: Field1 = A, Field2 = B, Field3 = C
Record 2: Field1 = A, Field2 = B, Field3 = D
But this record could not be saved:
Record 3: Field1 = A, Field2 = B, Field3 = C
With the Unique Index Registry entry it is possible to specify that one or more columns is unique but it is not possible to specify that a combination of columns is unique. For example, it is possible to specify that Field1, Field2, and Field3 must be unique in order to save a record but not that the combination of Field1 +Field2 +Field3 must be unique. No two records can share the same value in Field1, Field2 or Field3. For example, if Field1, Field2 and Field3 are defined as unique with a Unique Index Registry entry and Record 1 contains:
Field1 = A, Field2 = B, Field3 = C
Record 2 could not be saved if even one of the three fields has the same value as in Record 1. All three fields must be unique.