DictEnum.index2Symbol Method [AX 2012]

Returns the symbol or name of the enumeration item that is specified by an index.

public str index2Symbol(int index)

Run On

Called

Parameters

index
Type: int
The zero-based index of the enumeration in the AOT.

Return Value

Type: str
The symbol of the enumeration item that is specified by index; an empty string if index does not reference a valid enumeration item.

The symbol corresponds to the Name property of the enumeration item in the AOT.

The following example shows the retrieval of the symbol for items in an enumeration.

DictEnum de; 
int      i; 
 
de = new DictEnum(enumName2Id("ActionType")); 
for (i=0; i < de.values(); i++) 
{ 
    print int2str(i) + ", " + de.index2Symbol(i); 
}

Community Additions

ADD
Show: