DictTable.relation Method

Returns the name of a relation that is specified by index.

Syntax

public str relation(int RelationNumber, [TableScope tableScope])

Run On

Called

Parameters

  • RelationNumber
    Type: int
    The one-based index to the list of relations for the table, in AOT order.

Return Value

Type: str
The name of the relation that is specified by the RelationNumber parameter; an empty string if the RelationNumber value is not a valid relation index.

Examples

The following example shows the retrieval of the name for each relation in a table.

DictTable dt; 
int       i; 
 
dt = new DictTable(tablenum(CustTable)); 
if (dt) 
{ 
    for (i=1; i <= dt.relationCnt() ; i++) 
    { 
        print dt.relation(i); 
    } 
}

See Also

DictTable Class

DictRelation Class

DictTable.relationCnt Method