Go to documentation repository
You can create additional fields for the User object which are used in the Access Manager module (see Working with users in the Access Manager software module).
Additional fields are created using the text editor that allows you to view and edit the ASCII text encoding.
Structure of additional fields in .dbi
Additional fields for the User object are divided into 2 groups:
- The base field with default processing has the following structure: (db_name), (db_type) // (description).
Example: is_guest, BIT // Guest key.
The default processing depends on the data type (see Supported SQL data types). - The base field with special processing has the following structure: (db_name), (db_type) // (description){(fmt)%(prms)}.
Example: job_title, CHAR, 20 // Position{C%Waiter|Cashier|Storekeeper}.Attention!
The db_name structural element cannot be empty and must not match the existing standard user fields, because this disrupts the general logic of the Access Manager module and leads to failures and data loss.
The description structural element cannot be empty, because it is also the name of an additional field displayed in the Access Manager interface window, otherwise it will be ignored by the system.
The fmt structural element must be one of a fixed set of modifiers (see Field formats with special processing). If a modifier not from the set is specified or the parameters (prms) are specified incorrectly, the field will be processed by default according to its type (see Supported SQL data types).
Supported SQL data types
SQL data type | Representation | Default processing |
---|---|---|
BIT | Boolean | Drop-down list with Yes/No values |
INTEGER | Integer | Numeric field with increment/decrement and manual input option |
SMALLINT | ||
DATETIME | DateTime | Calendar with date and time selection option |
CHAR | String | Text field |
TEXT |
Field formats with special processing
Format | Description | Syntax |
---|---|---|
C | A drop-down list with a predefined and fixed set of possible values. Note. The type in the database can also be numeric, in which case the entire set of values must be numeric | {С%value1|value2|...|valueN} Example: {C%Waiter|Cashier|Storekeeper|Security} |
CT | A drop-down list where you can enter arbitrary values. The logic is similar to the C format, but it allows you to manually fill the field with text if necessary. It is used if the full list of possible values is too large, but there are few most frequently used options (they are predefined) | {CT%value1|value2|...|valueN} Example: {CT%Moscow|St. Petersburg} |
CCI | A drop-down list with predefined values and option to generate events on saving. It is used if changes in key user parameters need to be logged in the database or “intercepted” by an event dispatcher/script. It is recommended to make this field mandatory. Note. The event is generated if the given user was saved after changing the field, and the event is not generated when new users are currently created. The event that was edited is generated for the Access Manager module object. To see this event in the Event Viewer or use it in the Event Manager, add these events to the Access Manager object in the DDI file of the Access Manager module | {CCI%Descr1(EVENT1)|Descr2(EVENT2)|...||DescrN(EVENTN)} |
S | A numeric field with increment/decrement and manual input option. Note. If a numeric data type is selected for a field in the database, then it is necessary to take into account the minimum and maximum values in accordance with the ranges in the syntax | {S%0} or {S%min|max} Example 1: {S%0}—range of values: min -2147483648, max 2147483647 |
U | This format is internal and cannot be used to generate additional fields | - |
UT | Unique text with validation (checking for compliance with certain requirements) using a regular expression template. It is a convenient customization tool, but it requires technical knowledge in writing regular expressions. The text entered by the operator is checked against the template, and only if it matches the template—the field value can be changed. Also, when saving a user, the uniqueness of the entered value is checked: there cannot be two users with the same value for this field | {UT%pattern_base64} The text packed in Base64 format contains the following template (for the English version of the product):
|
UTS | Unique text. When saving a user, the uniqueness of the entered value is checked: there cannot be two users with the same value for this field. If another user tries to enter the same value into a field, a warning message is displayed that this value is already set for another user | {UTS%0} |
TC | Non-unique text that contains predefined values, with the option to add new values. It allows you to supplement the set of text values as necessary and re-select values from the list. It may have a fixed set of predefined values. Note. Before you edit a field, you should collect all variants of the value of this field from all users, eliminate the duplicates and add values to the list of predefined values, if any. Therefore: 1) If you want to remove a certain cached value from this list, you need to clear or change it for all users who have this value set in their fields. 2) If you save a value with an error, it will be cached along with other values. That is, the options “bucket”, “buc ket”, “bUcket” or “buket” will end up in the cache and can appear in the list of available values | {TC%EMPTY} or {TC%value1|value2|...|valueN} Example 1: {TC%EMPTY}—no predefined values. Example 2: {TC%Engineer|Medic|Accountant} |
TL | Text with limited length. Note. It is necessary to make sure that the field type in the database does not exceed the allowed length. The example above requires TEXT or CHAR, 10 (or more) | {TL%length} Example: {TL%10}—the line length is limited to 10 characters |
RO | An arbitrary readonly field. It is used, for example, to display data when importing users from an external system or if this field is filled in with a script when manual input by the operator is prohibited. Note. This format is similar to the normal default test field, which is marked as "Read Only" in the Access Manager settings. The difference is that this field remains non-editable even if it is marked as editable. It also has a default value | {RO%def_value} Example: {RO%Not specified} |
Creating additional fields for the User object
To create additional fields for the User object, do the following:
- In the Axxon PSIM installation directory, for example C:\Program Files (x86)\Axxon PSIM\ create a .dbi text document, for example, psim.person_extra_fields.dbi.
Open the created .dbi file in the text editor.
Attention!
Before you enter any data, make sure that the UTF-8 text encoding is selected. Otherwise, when adding additional fields to the database, the text will be recognized incorrectly.
- In the first line of the text document, enter [OBJ_PERSON].
- In subsequent lines, specify the additional fields parameters, namely:
- Enter the field name that will be saved in the database, the field data type, and the field size separated by a comma.
Specify the field description after a double slash "//": enter the field name that will be displayed in the Access Manager interface window, and set the field behavior pattern. In general, the description of the field is as follows: "Type {TC% value1 | valueN}", where:
Name Description Type The field name displayed in the Access Manager interface window. { Beginning of the field behavior pattern T The field will be editable, the entered value will be saved. C The field will be a drop-down list. % The predefined field value names are listed after the % sign. Note. If you specify %EMPTY, there will be no predefined values. value1, valueN The predefined field value names | Separation of the predefined field values UTS%0 The field will be editable with a unique value. If the user tries to enter a value which is already specified by other User, the warning will be displayed saying that the user with ID = "" already specified this value } End of the field behavior pattern
After you create the additional fields, save the changes.
Attention!
After you save the .dbi file, it is necessary to update the main database. To do this, use the idb.exe utility (see The idb.exe utility for converting databases, selecting database templates and making backup copies of databases).
As a result, the created fields will be available on the settings panel of the Access Manager object on the Additional fields tab (see Configuring Main department type).
Depending on the visibility and accessibility for editing the fields, as well as the specified category, the corresponding additional fields will be displayed in the Access Manager interface window.
Creating additional fields for the User object is complete.