1,运行下列的job即可。
2,本例子是以扩展类型itemID为例说明的,可以修改为任何扩展类型。
完整job演示:
static void ListFields(Args _args)
{
int curFieldNum =extendedTypeNum('ITEMID');
str 100 curFieldDESC;
Dictionary dictionary = new Dictionary();
DictTable dictTable;
DictField DictField;
str TableType;
int i,j;
;
for (i=1; i<=dictionary.tableCnt(); i++)
{
dictTable = new DictTable(dictionary.tableCnt2Id(i));
if (dictTable.isTmp())
TableType='Tmp';
else if (dictTable.isSystemTable())
TableType='Sys';
else if (dictTable.isMap())
TableType='Map';
else if (dictTable.isView())
TableType='View';
else
TableType='Normal';
if (!dictTable.isTmp() && !dictTable.isSystemTable() && !dictTable.isMap() && !dictTable.isView())
{
for (j=1;j<=dictTable.fieldCnt();j++)
{
DictField=new DictField(dictTable.id(),dictTable.fieldCnt2Id(j));
if ((TableType=='Normal') && (DictField.typeId()==curFieldNum))
{
curFieldDESC='Table Name: '+dictTable.name();
curFieldDESC+=' , Field Name: '+DictField.name();
info(curFieldDESC);
break;
}
else
continue;
}
}
}
}