Share via


DictTable.indexName2Id Method

Returns the ID of an index that is specified by name.

Syntax

public IndexId indexName2Id(str name)

Run On

Called

Parameters

  • name
    Type: str
    The name of the index.

Return Value

Type: IndexId Extended Data Type
The ID of the index that is specified by the name parameter; 0 (zero) if there is no index that has a name that equals the name value.

Examples

The following example shows the retrieval of the ID of an index that is specified by name.

DictTable dt; 

 
dt = new DictTable(tablenum(CustTable)); 
if (dt) 
{ 
    print(strfmt("Index ID: %1", dt.indexName2Id("TypeIdx"))); 
}

See Also

DictTable Class

DictTable.indexName Method