NumChild

Gets the number of child members for the current dimension member or for a specified member. This function can be used in these types of rules:

  • Calculation

  • Translation

  • Consolidation

  • Allocation

    Note:

    A member is a child if it is one level directly below a member in a tree hierarchy. Only members one level below the specified object are counted.

Syntax

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

Note:

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

Table 11-38 Syntax for NumChild Function

Parameter Description

<Object>

One of these object keywords:

  • Account

  • Custom1-4

  • Custom (Custom Dimension Label)

  • Entity

  • Node

  • Parent

Element

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

  • Account

  • Custom1...4

  • Custom

  • Entity

  • Node

  • Parent

For Account and Custom objects, you must specify the member - you cannot use a blank string.

To get the number of child members in the entire dimension, specify ALL within quotation marks, as in this example:

iAcctBase = HS.Account.NumChild("ALL")

Scenario

Name of a valid Scenario dimension member.

Year

A valid year.

Period

A valid period.

Entity

Name of a valid Entity dimension member.

You can embed the NumChild function in the Exp function. If you embed the NumChild function, do not surround NumChild’s argument with quotation marks.

Return Value

A string that identifies the number of child members. For Node, gets the number of active children of the specified member.

Example

In this example, the application contains an account named SalesChild that stores the average sales amount for the entities immediately under the Regional entity. To calculate the SalesChild amount, the example divides the Sales account’s amount by the number of children directly under Regional.

HS.Exp "A#SalesChild = A#Sales/HS.Entity.NumChild(Regional)"