4 Replies Latest reply: Jun 22, 2016 11:38 AM by Marcus Sommer RSS

    Fast way to get all table and field names from an app

    Arthur Kirchner

      Dear all,


      I'd like to have all tables and their fields from an app, there is this piece of code from the Qlik Sense manual (2.2):


      //Iterate through the loaded tables

      For t = 0 to NoOfTables() - 1

      //Iterate through the fields of table

        For f = 1 to NoOfFields(TableName($(t)))



          TableName($(t)) as Table,

          TableNumber(TableName($(t))) as TableNo,

          NoOfRows(TableName($(t))) as TableRows,

          FieldName($(f),TableName($(t))) as Field,

          FieldNumber(FieldName($(f),TableName($(t))),TableName($(t))) as FieldNo

          Autogenerate 1;

        Next f

      Next t;


      Unfortunately, this takes a very long time in my environment (> 1 hour) for approx. 1400 fields involved.


      Any guess to make this happen faster? I'd love to have something like sysobjects/syscolumns master tables, that'd give me the info in a jiffy, but also I know I'm soo 90's with my RDBMS thinking:)


      Thanks in Advance