I assume you are trying to see the fields that make up the specified relation.
In order to do this, you use the DictRelation and DictField classes. Create a new DictRelation based on the table, and then use loadTableRelation() to specify the related table. Create new DictFields and use the DictRelation.lineExternTableValue() method to specify the specific fields:
DictRelation dr;
DictField Field;
DictField RelatedField;
int RelationIndex = 1;
dr = new DictRelation(tableNum(InventDim));
dr.loadTableRelation(tableNum(EcoResColor));
info(strFmt("%1", tableId2name(dr.externTable())));
Field = new DictField(tableNum(InventDim), dr.lineTableValue(RelationIndex));
RelatedField = new DictField(tableNum(EcoResColor), dr.lineExternTableValue(RelationIndex));
info(strFmt("%1 related to %2", Field.name(), RelatedField.name()));
Không có nhận xét nào:
Đăng nhận xét