2 Replies Latest reply: Sep 1, 2016 10:59 AM by Bill Gates RSS

    Qlick Sense 3.0 How to programmatically set selections by value?

    Bill Gates

      Hello!

      I'm beginner in qlik and I'm trying work with Qlick Sense 3.0 programmatically


      I'm working with application described here

      I can't programmatically get selections, please assist

       

      This time, i want to set selections for field programmatically.

       

      I can do it by next commands and it works:

       

      app.field('Year').select([0], false, false);

      app.field('Year').select([0, 1, 2], true, true);

      app.field('Year').selectMatch('1997', true);

       

      app.field('Year').selectAll();

       

      But when I'm trying to select multiple values by value, nothing happening.


      my code is:

       

      app.field('Year').selectValues([{qText: '1997'}, {qText: '1998'}, {qText: '1999'}], true, true);


      Example I took from this instructions:

      https://help.qlik.com/en-US/sense-developer/3.0/Subsystems/APIs/Content/MashupAPI/Methods/selectValues-method.htm


      PS


      When I'm printing field values in console by next code:

       

       

      $.each(app.field('Year').getData().rows, function(key, value) {
        console.log(value.qText);
      });
      

       

      I'm receiving correct values:

       

      h_1472638260_9659500_2b2fa2a9bf.png

      Thanks

      Please assist...