2 Replies Latest reply: Dec 14, 2016 8:20 AM by Ankit Aggarwal RSS

    How to get Column Name in QVA Extension?

    Ankit Aggarwal

      Hello Guys,

       

      I am new to Qlik , I am generating some visualization for that I need to get the column names as well but unfortunately I am getting only rows data with this.Data.Rows.

      Example :

      Like this I have one table:

       

      Col1Col 2Col 3Header 4
      Dim112311124
      Dim243221154
      Dim323431111

      so from this, I want Col1,Col2,Col3 & Col4 Plus All rows. Currently, I can get rows data from this.Data.Rows.

       

      How to load the CSS file in QVA Extension?

      I have tried in this way

      Qva.LoadCSS(Qva.Remote + (Qva.Remote.indexOf('?') >= 0 ? '&' : '?') + 'public=only' + '&name=' + "Extensions/Objects/myextension/myextension.css");

       

      Any leads would be really appreciated.

       

      Note: I am working on Qlik Desktop 12 application , I don't have Qlik Server.

        • Re: How to get Column Name in QVA Extension?
          tarun dabhi

          Hello Guys,

           

          Even i am facing the same issue.

          I am not getting the header names when i am using this.Data.Rows with index 0.

            • Re: How to get Column Name in QVA Extension?
              Ankit Aggarwal

              Hello Tarun,

               

              It is resolved, you can retrieve column names by accessing:

              this.Data.HeaderRows.

               

              so this is will store the column names in objects so we need to write a loop to get the actual column names:I did in below mention way:

              Var csvData1;

              for(var row=0;row<this.Data.HeaderRows.length;row++)

                {

                for(var col=2;col<this.Data.HeaderRows[0].length;col++)

                {

                var title_val = this.Data.HeaderRows[row];

               

               

                csvData1 +=  title_val[col].text + ",";

                }

                }

              Alert(csvData1);

              Kindly let me know in case of any clarifications