3 Replies Latest reply: Jan 16, 2017 11:03 AM by Alexander Karlsson RSS

    Qlik Sense API read possible values of a specific field?

    Massimiliano Brugnerotto

      Hi to everyone,

      I'm looking for a javascript sample to read the possible values of a specific field using qlik sense 3.1 java script.

      I have try to use the field getData method but this return all data, not only the possibile data according to the current selections.


      This is the sample code I have tested :


      var app = qlik.currApp(this);

      var fieldData = app.field("CustomerName").getData(20, "V");

      for (t=0; t<fieldData.rows.length; t++)


           console.log("Value = [ " + fieldData.rows[t].qText + " ]");



      I'm looking for a java script code with the same functionality as the following VBS code I have used with QlikView :


      Set fullList = ActiveDocument.Fields("CustomerName").GetPossibleValues

      For t = 0 to fullList.Count - 1

           Call MsgBox("Value = " & fullList.item(t).Text)



      Anyone could help me please?

      Many Thanks