Dictionary structure is set similarly to that of a table dictionary. A dictionary is filled with elements based on the user algorithm. An algorithm is set as a Fore unit. A unit should include a procedure with the following signature:
Sub <Name>(UserDim: IUserDimension; Builder: IDimBuilder; Params: IMetabaseObjectParamValues);
Begin
//Code for building of elements tree of calculated dictionary
End Sub <Name>;
A procedure and parameters can have any names satisfying the Fore language specification.
A unit is executed each time a dictionary is used. However, due to object caching in the platform this operation is automatically executed only if the unit is not available in cache, or when executing the Update operation. In general case a calculated dictionary does not require a table to store its elements. Unit definition may include any repository objects, including data tables.
A calculated dictionary can be dynamically changed via parameters, that is, that is, a dynamic dictionary.
Create a calculated dictionary
The wizard contains the pages:
Basic Settings/Basic Properties. It is used to set object name, identifier and comment.
Parameters. It is used to set a list of parameters.
Attributes. It is used to create a list of attributes that describe each dictionary element.
Sorting. It is used to determine dictionary attributes and the order, by which dictionary elements will be sorted.
Structure. It is used to create dictionary structure using general and recursive blocks.
Levels. It is used to create a list of levels that will be used to set up data aggregation.
Macro. It is used to specify a unit containing a custom procedure that will be used to create a tree of dictionary elements.
Selection Schema. Selection schemas are set for automatic selection of dictionary elements by specified rules. Going to the page is available after saving dictionary settings.
Groups of Elements. Groups of elements are determined to limit the number of available dictionary elements. Going to the page is available after saving dictionary settings.
Alternative Hierarchies. Links are set to map source and alternative dictionary elements. Going to the page is available after saving dictionary settings.
NOTE. The Selection Schema, Groups of Elements, and Alternative Hierarchy pages are available only in the web application.
See also:
Creating Dictionaries | Table Dictionary | Calendar Dictionary