Item method: Level collection

Syntax

Item(LevelName, LevelNumber)

Description

The Item method returns a reference to the specified level in the level collection executing the method as an object. The LevelName parameter specifies the name of the level to access. This parameter takes a string value. The LevelNumber parameter specifies the number at which the level exists. This parameter takes a number value. For example, suppose your level collection contains the following levels, in this order:

  1. CORPORATE

  2. COMPANY

  3. DIVISION

  4. DEPARTMENT

  5. BRANCH

You want to access the fourth level, DEPARTMENT. You would use the following code:

&MYLEVEL = &LVLCOLLECTION.Item("DEPARTMENT", 4);