HierarchySubsetElementGetIndex
HierarchySubsetElementGetIndex retrieves the index of an element in a subset of a dimension hierarchy.
The function returns the index of the first occurrence of the specified element. If the element does not exist in the subset or cannot be found, then zero is returned. If the dimension or subset cannot be found or an out-of-range start index is specified, then an error is thrown and the TurboIntegrator function is stopped.
This function is valid in TM1® TurboIntegrator processes only.
Syntax
HierarchySubsetElementGetIndex(DimName, HierName, SubsetName, ElementName, StartIndex);
Argument |
Description |
---|---|
DimName | The parent dimension of the subset. |
HierName | The name of the hierarchy within the dimension. |
SubsetName | The subset that contains the element. |
ElementName | The element name to search for in the subset. The ElementName argument accepts both the element name and the alias. |
StartIndex | The index number to begin searching from. The value must be between 1 and the size of the subset. |
Example
HierarchySubsetElementGetIndex('Region', 'Country', 'Europe', 'Italy', 3);
This example retrieves the index for Italy from the Europe subset of the Country hierarchy in the Region dimension. The search starts at index 3.