Consider the process of creating a Socio-Economic Indicators table dictionary.
To create a dictionary in the object navigator, select the Create > Dictionary context menu item. The common dictionary creation wizard opens.
Define standard dictionary parameters on the Basic Properties page:
Name: Socio-economic indicators.
Identifier: D_SEP:
Skip the Parameters page because the dictionary is not parametric. Select the checkbox next to the Table Dictionary item on the Dictionary Type page, click the More Options button and go to the Attributes page:
Create the following dictionary attributes:
№ | Name | Identifier | Data type | Purpose |
1 | Name | NAME | String | Name |
2 | Order | ORDER | Integer | Order |
3 | Identifier | ID | Integer | Identifier |
4 | Owner | PARENT_ID | Integer |
To define the dictionary attribute properties, use the Dictionary Attribute Properties dialog box that opens on clicking the Add button.
Go to the Dictionary Structure page:
In the Dictionary Blocks and Indexes area, select Blocks and click the Add Block button. Select the Recursive radio button in the dialog box that opens and click the OK button:
Drag the Identifier dictionary attribute from the dictionary attribute list to the Block Primary Key Block 1 element.
Go to the next wizard page to bind the blocks to a relational structure:
From the schema object list, select the Socio-Economic Indicators Dictionary table, the fields of which should be linked to the dictionary attributes. Bind the fields to the attributes as follows:
Bind the Name field (T_SEP.NAME) to the Name attribute.
Bind the Code of Indicator field (T_SEP.ID) to the Identifier attribute.
Bind the Order field (T_SEP.ORDERS) to the Order attribute.
Bind the Code of Parent field (T_SEP.PARENT_ID) to the Parent attribute.
To bind the fields to the attributes, drag a field to the appropriate dictionary attribute.
To organize element hierarchy of the dictionary, set parameters in the Recursion section:
Double-click the Upper Level element and set the T_SEP.PARENT_ID = 0 formula in the opened editor:
Link by index: Primary index of the Block1 block.
Identifier: T_SEP.PARENT_ID.
Go to the last wizard page and click the Finish button. After that the created dictionary is displayed in the object navigator. To view the created dictionary, double-click it with the mouse:
See also: