List of table order by table Name

static void Job26(Args _args)
{
    tableId         tableId;
    TmpAotLabelImport TmpAotLabelImport;
    int             tablecounter;
    Common          tableCommon;
    DictTable       DictTable;
    Dictionary      dict = new Dictionary();
    Str             ListOfTable;
    TextBuffer Buffer = new TextBuffer();



    delete_from TmpAotLabelImport;
    for (tablecounter=1; tablecounter<=dict.tableCnt(); tablecounter++)
    {

        tableId = dict.tableCnt2Id(tablecounter);
        DictTable = new DictTable(tableId);
        TmpAotLabelImport.clear();
        TmpAotLabelImport.TreeNodePath = strLFix(DictTable.label(),50," ") + " -> "+ dict.tableName(tableId);

        TmpAotLabelImport.insert();
    }

    while select TmpAotLabelImport order by TreeNodePath
    {
        ListOfTable += TmpAotLabelImport.TreeNodePath + /*" ( "+DictTable.label()+" ) "-*/num2char(13)+num2char(10);
    }

    //YOU MUST PASTE TO SEE RESULT
    Buffer.setText(ListOfTable);
    Buffer.toClipboard();
    Box::info("finished");
    delete_from TmpAotLabelImport;
}

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.