12.13. System dictionaries
User shall have the ROLE_ADMIN to view/use system dictionaries.
Dictionary management
Create dictionary
Open the System dictionaries tab of the System-level Settings.
- Click the "+ Add dictionary" button to create a new dictionary.
- Specify the dictionary name, e.g.:
- Add values for the dictionary. For that, click the "+ Add value" button and specify the value in the appeared field, e.g.:
- Repeat previous step to add more values.
- After all values are specified, click the "Save" button:
- Just-created dictionary will appear in the dictionary list:
Edit dictionary
To edit the dictionary values:
- Find the appropriate dictionary in the list, click it.
- To rename a dictionary - click the field with the dictionary name, then change the name, e.g.:
- To rename any dictionary value - click it, then change the value, e.g.:
- To delete any dictionary value - click the corresponding icon near it, e.g.:
- To add a new dictionary value - click the "+ Add value" button and specify a new value, e.g.:
- After all changes were done, click the "Save" button to confirm them.
Remove dictionary
To remove the dictionary:
- Find the appropriate dictionary in the list, click it.
- Click the "Delete" button:
- Click the "OK" button to confirm the deletion:
Manage links between dictionaries
- To create a link from one value to another dictionary, click the corresponding link under the appropriate value:
- In the appeared pop-up, select the existing dictionary and its value that shall be auto filled, then click the "Add" button to confirm, e.g.:
- By the same way, you can add several links to one or more dictionaries.
- Link can be deleted by the corresponding button near ("Remove" button):
- After all links are added, close the pop-up. Links will be displayed near the source value, for which they are linked:
- Click the "Save" button to confirm changes
Using dictionaries
We will use the following dictionary:
- Open the attributes section for the entity you wish to add an attribute (in our example, we will add the attribute for the user).
- Click the "+ Add" button in the "Attributes" section:
- Into the "Key" field specify the dictionary name that you wish to use as categorical attribute:
Note: as you start typing into the "Key" field, possible dictionaries names will appear in the dropdown list - When the existing dictionary name will be specified into the "Key" field, the "Value" field "transforms" to the dropdown list with the all values of the corresponding dictionary:
- Any value from the list can be selected. Click the "Add" button to confirm the selection:
- Added attribute will appear:
- Later, the attribute value can be edit - in the same way (via the dropdown list with possible dictionary values).
- Also, the attribute name ("Key" field) can be renamed - in the same way as "regular" attributes. If the "Key" will be changed to any value that doesn't matches with any existing dictionary - the "Value" field will be automatically transform to the plain text field.
- If at step 5, the value with "links" will be selected, the linked dictionaries and their predefined values, will appear automatically:
Please note, all functionality described above is available only for admins. "General" users can't view/edit System Dictionaries.
Also, if non-admin user tries to specify any existing dictionary as the attribute "Key" - it will be displayed as plain text attribute. No dictionary values will be loaded/displayed.