Description of aggregation structure navigation functions
The Parent function
| Element | Description |
|---|---|
| Availability | From 3.0903 |
| Syntax | parent |
| Value returned | Parent node of the element or node on which advanced selection has been defined |
Example
$Entity.parent.code
Returns the code of the parent node of the entity specified in the filter.
The Children function
| Element | Description |
|---|---|
| Availability | From 3.0903 |
| Syntax | children([scenario],[period]) |
| Scenario | - scenario (optional) Scenario code - period (optional) Period code |
| Value returned | Elements and/or child nodes of the node to which the function is applied. If the function is applied to an element and not a node, it returns the element. |
Examples
- $Entity.children
Returns the child elements of the node of the specified entity hierarchy.
- $Entity.children(2013ACT,03)
Returns the child elements of the node of the time-dependent entity hierarchy specified for period 03 of scenario 2013ACT.
The Lowest function
| Element | Description |
|---|---|
| Availability | From 3.0903 |
| Syntax | lowest[scenario],[period],[restrictions] |
| Parameters | - scenario (optional) Scenario code - period (optional) Period code - restrictions (optional) These "partialise" the result of the deployment based on the filters in place. They can be activated or deactivated. The syntax for activating or deactivating them is the following: *"nomeLimitazione1:=TRUE |
| Value returned | Lowest level elements of the node to which the function is applied. If it is applied to an element instead, it returns the element. |
Examples
- $Entity.lowest
Returns the lowest level elements of the node of the entity hierarchy specified in the filter.
- $Entity.lowest(2013ACT,03)
Returns the lowest level elements of the node of the time-dependent entity hierarchy specified in the filter for period 03 of scenario 2013ACT.
- $Entity.lowest(EntityAccountCustom1Lim := FALSE;IntersectionLim := FALSE)
Returns the lowest level elements of the node of the entity hierarchy specified in the filter not considering the restrictions between entity and custom dimension 1. Ignores possible filters on the entity dimension originating from other hierarchies.
The Root function
| Element | Description |
|---|---|
| Availability | From 3.0903 |
| Syntax | root |
| Value returned | Root of the hierarchy to which the node or element belongs |
Example
$Entity.root.code
Returns the code of the root node of the entity hierarchy specified in the filter.
The All function
| Element | Description |
|---|---|
| Availability | From 3.0903 |
| Syntax | all |
| Value returned | Nodes and lowest level elements of the dimension specified in the filter |
Example
$Entity.all.code
Returns the codes of all lowest level elements and nodes of the entity hierarchy specified in the filter.
The Ancestor function
| Element | Description |
|---|---|
| Availability | From 3.0903 |
| Syntax | Ancestor(ancestorLevel) |
| Parameters | ancestorLevel Level of hierarchy |
| Value returned | Ancestor level ancestorLevel. If the parameter exceeds the hierarchy root, it returns an empty set. |
Examples
- $Entity.ancestor(1).code
Returns the code of the parent node of the entity. Ancestor(1) is equivalent to the parent function.
- $Entity.ancestor(2).code
Returns the code of the grandparent node of the entity on which it is applied.
The AllAncestors function
| Element | Description |
|---|---|
| Availability | From 3.0903 |
| Syntax | AllAncestors(ancestorLevel) |
| Parameters | ancestorLevel Level of hierarchy |
| Value returned | All ancestors up to the ancestorLevel. If the parameter exceeds the hierarchy root, the system returns all ancestor nodes up to the root, inclusive |
Example
$Entity.allancestors(2).code
Returns the code of the parent node and grandparent node of the entity on which it is applied.
The Descendants function
| Element | Description |
|---|---|
| Availability | From 3.0903 |
| Syntax | Descendants(descLevel) |
| Parameters | descLevel Level of hierarchy |
| Value returned | Descendent levels descLevel. If the parameter exceeds the level of the hierarchy's lowest level elements, the system returns an empty set |
Examples
- $Entity.descendants(1).code
Returns the codes of the elements and/or child nodes of the node of entities on which it is applied. Descendants(1) is equivalent to the children function.
- $Entity.descendants(2).code
Returns the codes of the elements and/or grandchild nodes of the node of entities on which it is applied.
The AllDescendants function
| Element | Description |
|---|---|
| Availability | From 3.0903 |
| Syntax | AllDescendants(descLevel) |
| Parameters | descLevel Level of hierarchy |
| Value returned | All descendants up to the descLevel level. If the parameter exceeds the level of the hierarchy's lowest level elements, the system returns all the descendant nodes and leaves up to the lowest level elements, inclusive. |
Example
$Entity.alldescendants(2).code
Returns the codes of the elements and/or child and grandchild nodes of the node of entities on which it is applied.
The Complementary function
| Element | Description |
|---|---|
| Availability | From 3.0903 |
| Syntax | Complementary(ancestorLevel) |
| Parameters | ancestorLevel Level of hierarchy |
| Value returned | Complementary elements of the element present in the filter, calculated in relation to the ancestor node specified by the ancestorLevel parameter. |
Example
$Entity.complementary(1).code
Returns the codes of the entities belonging to the sub-tree of the parent node of the entity specified in the filter.
The Siblings function
| Element | Description |
|---|---|
| Availability | From 3.0903 |
| Syntax | siblings |
| Parameters | ancestorLevel Level of hierarchy |
| Value returned | The siblings of the element to which it is applied, including the element itself. If you want to exclude the starting element, you can remove it from the returned set using the difference operator between sets. |
Examples
- $Entity.siblings.code
Returns the code of the siblings of the element to which it is applied, including the element itself.
- $Entity.siblings.code - $Entity.code
Returns the code of the siblings of the element to which it is applied, excluding the element itself.
The OnlyLeafs/OnlyNodes function
| Element | Description |
|---|---|
| Availability | From 3.0903 |
| Syntax | onlyLeafs, onlyNodes |
| Value returned | Only the leaves (lowest level elements) and nodes of the set |
Examples
- $Entity.children.onlyLeafs
Returns only the leaves from among the children of the current entity node, excluding the nodes.
- $Entity.children.onlyNodes
Returns only the nodes from among the children of the current entity node, excluding the leaves.
The GetLeafs/GetNode function
| Element | Description |
|---|---|
| Availability | From 3.0903 |
| Syntax | getLeaf(code), getNode(code) |
| Parameters | - code. Code of the leaf and node to be retrieved |
| Value returned | Leaf or node, with the code indicated as parameter, in the same hierarchy as the node to which the functions are applied |
Examples
- $Entity.getLeaf("10")
Returns only the leaf with code "10" from among the leaves of the hierarchy to which the current entity belongs.
- $Entity.getNode("01").lowest
Returns all the leaves of the node with code "01" of the hierarchy to which the current entity belongs.
- $Category.getLeaf("C1")
Returns category C1.

IMPORTANT: several nodes could be related in the groupings of a leaf. In such cases, the expression returns leaf duplicates for every node to which it is related. To take one of them, use the trimSet function.
- $Category.getLeaf("C1").trimSet(1).code
Returns only the first occurrence of the leaf with code C1
The IsLeaf function
| Element | Description |
|---|---|
| Availability | From 3.0903 |
| Syntax | isLeaf |
| Value returned | 1 if it is a leaf, otherwise 0. If the function is applied to a set with more than one element, the system returns an error |
Example
$Entity.isLeaf
Returns 1 if the entity dimension is a leaf.
The Level function
| Element | Description |
|---|---|
| Availability | From 3.0903 |
| Syntax | Level |
| Value returned | Whole number indicating the level of nesting within the hierarchy. The root of a hierarchy is level 1, its children are level 2, etc. This function is useful for applying different formatting to the levels of a hierarchy with conditional expressions via a style sheet. From version 1109P, the function returns the value 0 if applied to: - row or column placeholders - "+" rows/columns created automatically when the possibility of inserting new elements in data entry is enabled |
Example
$Entity.level
Returns 3 if the entity dimension is a leaf of a child node of the hierarchy root.
The This function
| Element | Description |
|---|---|
| Availability | From 3.0903 |
| Syntax | this |
| Value returned | Node specified in the row/column filters tree to which advanced selection has been applied |
Example
this.lowest
Returns the leaves of the node used as the row/column filter on which advanced selection has been defined.
The Select function
| Element | Description |
|---|---|
| Availability | From 3.0903 |
| Syntax | - select (field, operator, value) - select (condition) |
| Parameters | - field Dimensional attribute (can be managed using string manipulation functions) to be compared with value - operator Comparison logic operator - value String or variable to be compared with field - condition Logical expression that returns a true/false result for every element of the set to which the formula is applied. If it is necessary to use inverted commas within the string expression, use the constant QT. |
| Value returned | Elements of the set that satisfy the condition defined via the three parameters (field, operator, value) or a single parameter (condition) |
Examples
- $Entity.lowest.select("$Entity.attribute1", "=", "A")
Returns the leaves of the starting node that have "A" as the value of attribute 1.
- $Entity.children.select("$Entity.lowest.size > 3")
Returns the children of the starting node that have more than 3 leaves related.
- $Entity.children.select("LEFT($Entity.code,3)=" + QT + "000" +QT)
Returns the children of the starting node with a code starting with "000".
The Sort function
| Element | Description |
|---|---|
| Availability | From 3.0903 |
| Syntax | sort(expression, ["DESC"]) |
| Parameters | - expression Expression on the basis of which to run sorting - "DESC" (optional) The predefined sorting is ascending; it becomes descending if "DESC" is specified |
| Value returned | List of the elements of the set sorted according to the expression parameter |
Examples
- $Entity.children.sort("$Entity.attribute1"
Sorts the children of the entity filter in ascending order based on the custom 1 attribute.
- $Entity.children.sort("$Entity.attribute1", "DESC")
Sorts the children of the entity filter in descending order based on the custom 1 attribute.
- $Entity.children.sort("$Entity.children.size" , "DESC").sort( "$Entity.attribute1")
Sorts the children of the entity filter in ascending order based on the custom 1 attribute. If the value of attribute 1 remains the same, it sorts the number of children of the involved elements in descending order.
The SetEditability function
| Element | Description |
|---|---|
| Availability | From 3.0903 |
| Syntax | - setEditability(editMode, field, operator, value) - setEditability(editMode, condition) |
| Parameters | - editMode Editability type to be assigned to elements. It can be set to "editable" or "e", "protected" or "p" and "readonly" or "ro" - field Dimensional attribute (can be managed using string manipulation functions) to be compared with value - operator Comparison logic operator - value String or variable to be compared with field - condition Logical expression that returns a true/false result for every element of the set to which the formula is applied. If inverted commas need to be used in the string, use the constant QT |
| Value returned | Assigns the specified editability type to the elements of the set that satisfy the condition defined via the three parameters (field, operator, value) or a single parameter (condition). Editability can only be overridden in accordance with the following rules: - If the starting node has been indicated as "not specified" or "editable" in the Matrix Wizard, it can be overridden with any editability type - If the starting node is indicated as "protected", it can only be made non-editable - If the starting node has been indicated as "not editable", its editability cannot be changed using this function. |
Examples
- myAccountsSet.setEditability("readonly", "LEFT($Account.code,3)", "<=", "000")
Makes the accounts of the set whose codes starts with "000" non-editable.
- myAccountsSet.setEditability("readonly", "$Account.code.length <= 5")
Makes the accounts of the set whose code has less than 5 characters non-editable.
The OrFilter function
| Element | Description |
|---|---|
| Availability | From 3.0903 |
| Syntax | orFilter(element1, element2, ... elementN) |
| Parameters | - element1 Will form part of the final filter. Can be defined as a string between inverted commas or dimensional function - element2 As above |
| Value returned | A single filter obtained by combining, with OR relationships, elements processed as parameters. If one of the parameters is a set, OR relationships are established among all elements of the set. |
Examples
- OrFilter($Entity.getLeaf(“01“), $Entity.getLeaf(“02“))
Establishes an OR relationship between entities 01 and 02.
- OrFilter($Entity.children)
Establishes an OR relationship among the children of the node of the entity hierarchy to which it is applied.
Can also be written as: $Entity.children.orFilter().
The ContainedFilter function
| Element | Description |
|---|---|
| Availability | From 3.0903 |
| Syntax | containedFilters(orFilter) |
| Parameters | orFilter Filter made up of a set of filters combined using OR relationships |
| Value returned | The inverse orFilter function. Returns the set of OR filters in the filter processed as a parameter |
Example
$Dest1.containedFilters.lowest.code
Takes the OR clauses and obtains the originally involved lowest level elements from them.
The SyntheticSchema function
| Element | Description |
|---|---|
| Availability | From 3.0903 |
| Syntax | syntheticSchema(FSTCode) |
| Parameters | FSTCode Schema or FST item code |
| Value returned | Schema or FST item shown in synthetic mode |

IMPORTANT: prevent 'partialising' the result of this script with the select functions and similar functions. If the script only returns some of the elements, some formulas present in certain FST items may be targeting elements that are not returned and this could be generating an error in the run step.
Example
SyntheticSchema(@SP)
Generates the synthetic schema specified as the value of parameter SP.
The AnalyticalSchema function
| Element | Description |
|---|---|
| Availability | From 3.0903 |
| Syntax | analyticalschema(FSTCode) |
| Parameters | FSTCode Schema or FST item code |
| Value returned | Schema or FST item shown in synthetic mode |

IMPORTANT: prevent 'partialising' the result of this script with the select functions and similar functions. If the script only returns some of the elements, some formulas present in certain FST items may be targeting elements that are not returned and this could be generating an error in the run step.
Example
AnalyticalSchema(@SP)
Generates the analytical schema specified as the value of parameter SP.
The ControlGroup function
| Element | Description |
|---|---|
| Availability | From 3.0903 |
| Syntax | controlGroupcontrolgroupCode |
| Parameters | controlgroupCode Control group code |
| Value returned | Control group detailed in the accounts |
Example
ControlGroup(@CG)
Generates details of the control group specified as the value of parameter CG.
FromHierarchy
| Element | Description |
|---|---|
| Availability | From 3.0903 |
| Syntax | fromHierarchy(hierarchy_code) |
| Parameters | - hierarchy_code Hierarchy code |
| Value returned | The same element to which the function is applied but taking it from the hierarchy specified as the parameter |
Example
With a "Geographical area" hierarchy with code "AG" on the entity dimension and with a form filtered on another hierarchy, the geographical area to which the entity belongs can be obtained even if the "Geographical hierarchy" has not been used in the form.
- $Entity.fromHierarchy(“AG“)
Returns the same element used a s a filter but read by the "AG" hierarchy.

IMPORTANT: if it is a node and there is no node with the same code in the "AG" hierarchy, the system will return a warning and the cell will not be calculated.
- $Entity.fromHierarchy(“AG“).parent.code
Returns the code of the node of the "AG" hierarchy to which the entity specified in the filter is related.