List of tables in form grid:
Here I want to get the list of AOT tables in my form.
First i have created a table with table type Inmemory.
I have created a field in that table i.e Tablename.
I have created a form using that table as datasource.
I have created a button in design and have override Clicked().
Clicked():
void clicked()
{
Dictionary dictionary;
TableId tableId;
TableName tableName;
TmpTablesList objTest;
TmpTablesList obj;
dictionary = new dictionary();
tableId = dictionary.tableNext(0);
tableName = dictionary.tableName(tableId);
while(tableId)
{
objTest.clear();
//info(strFmt("%1 - %2",int2str(tableId),tableName));
objTest.TableName = tableName;
//obj.Tablename = tableId;
objTest.insert();
info(strFmt("%1 ",objTest.TableName));
tableId = dictionary.tableNext(tableId);
tableName= dictionary.tableName(tableId);
if(tableId==10)
break;
}
TmpTablesList.setTmpData(objTest);
TmpTablesList_ds.executeQuery();
super();
}
Here I want to get the list of AOT tables in my form.
First i have created a table with table type Inmemory.
I have created a field in that table i.e Tablename.
I have created a form using that table as datasource.
I have created a button in design and have override Clicked().
Clicked():
void clicked()
{
Dictionary dictionary;
TableId tableId;
TableName tableName;
TmpTablesList objTest;
TmpTablesList obj;
dictionary = new dictionary();
tableId = dictionary.tableNext(0);
tableName = dictionary.tableName(tableId);
while(tableId)
{
objTest.clear();
//info(strFmt("%1 - %2",int2str(tableId),tableName));
objTest.TableName = tableName;
//obj.Tablename = tableId;
objTest.insert();
info(strFmt("%1 ",objTest.TableName));
tableId = dictionary.tableNext(tableId);
tableName= dictionary.tableName(tableId);
if(tableId==10)
break;
}
TmpTablesList.setTmpData(objTest);
TmpTablesList_ds.executeQuery();
super();
}
No comments:
Post a Comment