GetMembers method: AnalyticModel class

Syntax

GetMembers(DimName, DimFilter)

Description

Use the GetMembers method to return the names of the members in the specified dimension. You can specify a user function to be used as a filter for the dimension using DimFilter.

When filtering hierarchy nodes, if the parent member is filtered, all the child nodes are also filtered.

In order to filter the parent member if all of its children are filtered, the user function should be written such that for the parent node, apply the condition on all of its children, using the FORCHILDREN built-in function. If none of the children satisfy the condition, return zero from the user function, which filters the parent node.

Parameters

Parameter Description

DimName

Specify the name of the dimension from which you want to get the members.

DimFilter

Specify a user function that you want to use to filter the dimension.

Returns

A two-dimensional array of any.

The first dimension contains the member names. The second dimension contains the parent of the member. The members are sorted in the hierarchy order.

If the dimension does not have a hierarchy, all members are returned as level one.

For example, if the dimension has the following members:

ALLREGIONS
   NORTH AMERICA
      USA
      CANADA
      MEXICO
   EUROPE
      FRANCE
      GERMANY
      ENGLAND
   ASIA	
      JAPAN
      CHINA

The GetMembers method returns the following:

Member Name Level

ALLREGIONS

Null

NORTHAMERICA

ALLREGIONS

USA

NORTHAMERICA

CANADA

NORTHAMERICA

MEXICO

NORTHAMERICA

EUROPE

ALLREGIONS

FRANCE

EUROPE

ENGLAND

EUROPE

GERMANY

EUROPE

ASIA

ALLREGIONS

JAPAN

ASIA

CHINA

ASIA

If the total member is present in the metadata, it is returned as level zero.