static void Jimmy_TableListDictoryData(args a) { Dictionary Dictionary = new Dictionary(); int tableCounter = Dictionary.tableNext(0); Dialog Dialog = new Dialog("Please Enter table"); DialogField dlgTableName = Dialog.addField(typeId(TableName));//SysLastValue int FieldCounter,i,m,TableId; DictTable DictTable; DictField DictField; str extend; container con; TableName TableName; void fieldList(TableId _TableId) { ; DictTable = new DictTable(_TableId); if(DictTable.id() == DictTable.id())//SysLastValue //InventTable { FieldCounter = DictTable.fieldNext(0); while(FieldCounter > 0) { DictField = new DictField(DictTable.id(),FieldCounter); if(!DictField.isSystem()) { switch(DictField.baseType()) { case Types::Enum : extend = enumid2name(DictField.enumId());break; default : extend = global::extendedTypeId2name(DictField.typeId());break; } con += ["id : " + int2str(DictField.id()),"name : " + DictField.name(),"label : " + DictField.label(),"Extend : " + extend]; } FieldCounter = DictTable.fieldNext(FieldCounter); } setprefix(DictTable.name()); for(i = 1; i <= conlen(Con); i ++) { m++; info(strfmt("The %1th field - %2,%3,%4,%5",m,conpeek(con,i),conpeek(con,i+1),conpeek(con,i+2),conpeek(con,i+3))); i += 3; } } } ; Dialog.doInit(); dlgTableName.value("SysLastValue"); if(!Dialog.run()) return; TableName = dlgTableName.value(); TableId = tablename2id(TableName); DictTable = Dictionary.tableObject(TableId); if(!DictTable) return; while(tableCounter > 0) { if(TableId) { fieldList(TableId); return; } else fieldList(tableCounter); tableCounter = Dictionary.tableNext(tableCounter); } }