Mandatory field Registry entries
Two Registry entries are used to specify which fields are mandatory:
- Mandatory Registry entry
Specify that a field is mandatory and must be completed before a record can be saved.
A field specified as mandatory must contain a value in order for a record to be saved. If no value is entered in a mandatory field, an error message can be displayed when a user attempts to save the record, and the cursor moves to the incomplete field.
Any field in any module can be specified as mandatory.
- Mandatory Modifier Registry entry
Modify the mandatory setting for a field (set using the Mandatory Registry entry) based on data found in the current record.
A field specified as mandatory must contain a value in order for a record to be saved. If no value is entered in a mandatory field, an error message can be displayed when a user attempts to save the record, and the cursor moves to the incomplete field.
Any field in any module can be specified as mandatory.
Tip: When a field is specified as mandatory, it can be given a background color for emphasis.
See Mandatory Modifier Registry entry for details about modifying the mandatory setting for a field based on data found in the current record.
Usage
This Registry entry can be assigned to users and groups:
Key | User | User | Group | Group | Group | Group |
---|---|---|---|---|---|---|
Key 1 | User
|
User
|
Group
|
Group
|
Group
|
Group
|
Key 2 | user | user | group | group | Default
|
Default
|
Key 3 | Table
|
Table
|
Table
|
Table
|
Table
|
Table
|
Key 4 | table | Default
|
table | Default
|
table | Default
|
Key 5 | Mandatory
|
|||||
Key 6 | column | |||||
Value | boolean;optional message if mandatory test fails |
User
|
user | Table
|
table | Mandatory
|
column | boolean;optional message if mandatory test fails |
User
|
user | Table
|
Default
|
Mandatory
|
column | boolean;optional message if mandatory test fails |
Group
|
group | Table
|
table | Mandatory
|
column | boolean;optional message if mandatory test fails |
Group
|
group | Table
|
Default
|
Mandatory
|
column | boolean;optional message if mandatory test fails |
Group
|
Default
|
Table
|
table | Mandatory
|
column | boolean;optional message if mandatory test fails |
Group
|
Default
|
Table
|
Default
|
Mandatory
|
column | boolean;optional message if mandatory test fails |
where:
column |
|
boolean |
is If required, add a message to display when a user tries to save a record but a value has not been entered in a mandatory field. Note:
A |
Note: Mandatory fields are typically set at the Group|Default
level and are the same for all users, although they can be set for specific users and groups.
Note: A separate Registry entry is required for each field that is to be mandatory.
Example
This entry specifies that the AddPhysCountry (Country) field in a record in the Parties module must be completed before the record can be saved:
Key | Setting |
---|---|
Key 1 | Group
|
Key 2 | Default
|
Key 3 | Table
|
Key 4 | eparties
|
Key 5 | Mandatory
|
Key 6 | AddPhysCountry
|
Value | true;Country is mandatory
|
Modify the mandatory setting for a field (set using the Mandatory Registry entry) based on data found in the current record.
Usage
This Registry entry can be assigned to users and groups:
Key | User | User | Group | Group | Group | Group |
---|---|---|---|---|---|---|
Key 1 | User
|
User
|
Group
|
Group
|
Group
|
Group
|
Key 2 | user | user | group | group | Default
|
Default
|
Key 3 | Table
|
Table
|
Table
|
Table
|
Table
|
Table
|
Key 4 | table | Default
|
table | Default
|
table | Default
|
Key 5 | Mandatory Modifier
|
|||||
Key 6 | column | |||||
Key 7 | value | |||||
Value | settings |
User
|
user | Table
|
table | Mandatory Modifier
|
column | value | settings |
User
|
user | Table
|
Default
|
Mandatory Modifier
|
column | value | settings |
Group
|
group | Table
|
table | Mandatory Modifier
|
column | value | settings |
Group
|
group | Table
|
Default
|
Mandatory Modifier
|
column | value | settings |
Group
|
Default
|
Table
|
table | Mandatory Modifier
|
column | value | settings |
Group
|
Default
|
Table
|
Default
|
Mandatory Modifier
|
column | value | settings |
where:
column |
is the back-end name of the field which should be consulted to look for a matching value. |
||
value |
is a case insensitive match (i.e. patterns / wildcards are not allowed unlike with the Security|Update Registry entry). The value is checked against the complete contents of column. The comparison is case insensitive. If column is a table of values, then each entry in the table is tested. If one matches, the Registry entry applies. Values of Note:
If using |
||
settings |
is a semicolon separated list of assignments to columns that is applied if there is a match of the data in column with the value query. The format of settings is: column=boolean;column=boolean;... where: |
||
column |
is the name of the column to be modified. |
||
boolean |
is true (the column should be mandatory) or false (the column should not be mandatory, i.e. remove the mandatory setting). |
For this example, we want the Object
Key | Setting |
---|---|
Key 1 | Group
|
Key 2 | Default
|
Key 3 | Table
|
Key 4 |
ecatalogue
|
Key 5 | Mandatory Modifier
|
Key 6 |
RecObjectType
|
Key 7 |
Object
|
Value | TitMainTitle =true
|
Now when the record type is set to Object
Key | Setting |
---|---|
Key 1 | Group
|
Key 2 | Default
|
Key 3 | Table
|
Key 4 |
ecatalogue
|
Key 5 | Mandatory
|
Key 6 | TitMainTitle
|
Value | false;Please enter
a Main Title for the Object
|
will display the error message Please enter
a Main Title for the Object
true
. A false
value indicates that the field is not mandatory by default.
The above example shows how to alter the mandatory setting for a field (
In this example the mandatory setting for more than one field is altered based on the values of multiple fields. If the Object
and the object status is set to Accessioned
, then the Accession Number, Date Accessioned and Accession Lot
Key | Setting |
---|---|
Key 1 | Group
|
Key 2 | Default
|
Key 3 | Table
|
Key 4 |
ecatalogue
|
Key 5 | Mandatory Modifier
|
Key 6 |
RecObjectType
|
Key 7 |
Object
|
Value |
TitAccessionNo=true;TitAccessionDate=true;TitAccessionLot=true
|
Key |
Setting |
Key 1 | Group
|
Key 2 | Default
|
Key 3 | Table
|
Key 4 |
ecatalogue
|
Key 5 | Mandatory Modifier
|
Key 6 |
TitObjectStatus
|
Key 7 |
Accessioned
|
Value |
TitAccessionNo=true;TitAccessionDate=true;TitAccessionLot=true
|
Where multiple values are to be checked, a Mandatory Modifier Registry entry is required for each value for each column. Where multiple Registry entries match based on the values within fields (as with the previous example where both the object type and object status matched), the mandatory settings are ANDed together. This means that unless all the settings for a given field are true
, mandatory is set to false
.