HierarchySubsetCreate

HierarchySubsetCreate creates an empty public subset of a specified hierarchy and dimension.

When the optional AsTemporary argument is set to 1, the subset is temporary and persists only for the duration of the TurboIntegrator process or chore in which the subset is created.

Note:

For TM1® Server version 11.2.0 and earlier, temporary subsets were visible and usable only by the process that created it and any of its child processes. Temporary subsets were not visible to the ancestor and sibling processes. You could create same-named subsets in sibling child processes with the same parent process.

For TM1 Server version 11.3.0 and later, these temporary subsets are visible to the ancestor and sibling processes. If a parent TurboIntegrator process A invokes two child TurboIntegrator processes A1 and A2, and the child TurboIntegrator process A1 creates a temporary subset S, the temporary subset S exists for the duration of the parent TurboIntegrator process A. You cannot create a temporary subset with the same name S in the sibling TurboIntegrator process A2 since the subset is visible and usable by siblings A1 and A2.

While a temporary subset exists, the temporary subset takes precedence over any same-named public subset. If another TurboIntegrator function references a subset that exists in both a temporary and permanent state, the function operates upon the temporary subset.

There is no locking associated with a temporary subset, as a temporary subset is never saved. This can result in improved performance, because there is no need for TurboIntegrator to wait for locks to be released before operating upon a temporary subset.

This function is valid in TM1 TurboIntegrator processes only.

Syntax

HierarchySubsetCreate(DimName, HierName, SubName, [AsTemporary]);

Argument

Description

DimName The parent dimension of the subset you are creating.
HierName The name of the hierarchy within the dimension.
SubName The name you want to assign to the subset.
AsTemporary This is an optional argument that specifies whether the subset being created is temporary. 1 indicates a temporary subset, 0 indicates a permanent subset.

If this argument is omitted, the subset is permanent.

Example

HierarchySubsetCreate('Region', 'European', 'Northern Europe', 1);

This example creates the temporary Northern Europe subset of the European hierarchy in the Region dimension. You can use SubsetElementInsert to add elements to the subset.