ICalendarDimInstance.UpLevel

Syntax

UpLevel(El: Integer): Integer;

Parameters

El — element index.

Description

The UpLevel method returns index of calendar dictionary element which is positioned one level higher than the element index of which is passed by the El parameter. It returns -1 if there are no elements on a higher level.It returns -1 if there are no elements on a higher level.

Example

Sub UserProc;
Var
    MB: IMetabase;
    Obj: IMetabaseObjectDescriptor;
    CalClass: CalendarDimInstanceFactory;
    Dim: IDimInstance;
    CalInst: ICalendarDimInstance;
    i: Integer;
Begin
    Mb:=MetabaseClass.Active;
    Obj:=Mb.ItemById("CALENDAR_DIM");
    Dim:=Obj.Open(NullAs IDimInstance;
    CalClass:=New CalendarDimInstanceFactory.Create;
    CalInst:=CalClass.CreateCalendarDimInstance(Dim);
    i:=CalInst.UpLevel(100);
End Sub UserProc;

After executing the example the "i" variable contains index of the parent element of the 100th dictionary element. Dictionary identifier: CALENDAR_DIM.

See also:

ICalendarDimInstance