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 Informant field to be mandatory, but only if the record type is Full
:
Key | Setting |
---|---|
Key 1 | Group
|
Key 2 | Default
|
Key 3 | Table
|
Key 4 | ebirths
|
Key 5 | Mandatory Modifier
|
Key 6 |
RegistrationType
|
Key 7 | Full
|
Value |
InformantName
=true
|
Now when the record type is set to Full
, the Informant field must be filled before the record can be saved successfully. If Informant is not completed, the standard error message is displayed. You may tailor the error message shown using the Mandatory Registry entry. For example:
Key | Setting |
---|---|
Key 1 | Group
|
Key 2 | Default
|
Key 3 | Table
|
Key 4 | ebirths
|
Key 5 | Mandatory
|
Key 6 |
InformantName
|
Value | false;Please enter an Informant Name for this Birth
|
will display the error message Please enter
an Informant Name for this Birth
if the field is not filled while the mandatory setting is 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 (InformantName) based on the value in another field (RegistrationType).
In this example the mandatory setting for more than one field is altered based on the values of multiple fields. If the Full
and the AdoptionFlag is set to Yes
, then the DateOfAdoptionDecrees and DecreeAuthority
Key | Setting |
---|---|
Key 1 | Group
|
Key 2 | Default
|
Key 3 | Table
|
Key 4 | ebirths
|
Key 5 | Mandatory Modifier
|
Key 6 |
RegistrationType
|
Key 7 | Full
|
Value | DateOfAdoptionDecree=true;DecreeAuthority=true;TitAccessionLot=true
|
Key |
Setting |
Key 1 | Group
|
Key 2 | Default
|
Key 3 | Table
|
Key 4 | ebirths
|
Key 5 | Mandatory Modifier
|
Key 6 | AdoptionFlag
|
Key 7 | Yes
|
Value | DateOfAdoptionDecree=true;DecreeAuthority=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
.