IsDescendant

Determines if the current member or a specified member is a descendant of the specified parent. This function can be used in these types of rules:

  • Calculation

  • Translation

  • Consolidation

  • Allocation

    Note:

    A member is a descendant if it is at a level below a parent in a tree hierarchy. Descendants are within the same branch of the tree.

For example, in this hierarchy, FosterCity and Sunnyvale are descendants of California and UnitedStates.


Descendants in Hierarchy

Syntax

HS.<Object>.IsDescendant("Parent","Element")
         
HS.Node.IsDescendant("Parent"."Entity","S#Scenario.Y#Year.P#Period")
HS.<Object>.IsDescendant("Parent","")
HS.Custom(Dimension).IsDescendant(Member)

Note:

Use a blank string ("") to apply this function to the current member.

Table 11-33 Syntax for IsDescendant Function

Parameter Description

<Object>

One of these object keywords:

  • Account

  • Custom1...4

  • Custom (Custom Dimension Label)

  • Entity

  • Parent

Parent

Name of a valid Parent member. Parent is required.

Element

Depending on the object selected, name of a valid member of one of these dimensions:

  • Account

  • Custom1...4

  • Custom

  • Entity

  • Parent

Entity

Name of a valid Entity dimension member.

Scenario

Name of a valid Scenario dimension member.

Year

A valid year.

Period

A valid period.

Note:

When you use node as the object, the function determines if the member is an active descendant of the specified parent.

Return Value

A Boolean expression that is True if the element is a descendant of the specified parent; False if the element is not a descendant of the specified parent.

For Node, True if the element is an active descendant of the specified parent; False if the element is not an active descendant of the specified parent.

Example

In this example, if Connecticut is a descendant of Regional, then statements between the If...Then and End If lines are executed.

If HS.Entity.IsDescendant("Regional","Connecticut") = TRUE Then
  ...
End If
If HS.Custom("Prod").IsDescendant("All_Phones", P3000_Phones")
...
End If