2 Replies Latest reply: Jan 23, 2018 3:58 AM by Xavier Garcia RSS

    Field API - Selecting dates with selectValues() not working

    Xavier Garcia

      Hello everyone,


      I am trying to call the Field API in my mashup in order to select a range of dates. I am trying to use selectValues() method. Everything is set up but the last step which communicates with the Qlik Sense API seems not to be working for me.


      I first doubted about the date format not being the correct one with my data model; both of them have the 'mm/dd/yyyy' date format. As suggested in this thread, I also tried the qNumber value type without any success.


      See below how other Field API methods still work with my 'Date' dimension:


      app.field('Date').selectMatch('01/10/2018', true);             // Working
      app.field('Date').selectValues('01/10/2018', true);            // Not working
      app.field('Date').selectValues(['01/10/2018'], true);          // Not working
      app.field('Date').selectValues([{qText: '01/10/2018'}], true); // Not working
      app.field('Date').selectValues([{qText: "01/10/2018"}], true); // Not working
      app.field('Date').selectValues([{qNumber: 01/10/2018}], true); // Not working
      app.field('Week Number').selectValues([2], true);              // Working


      How is that selectMatch() works with my date value as string format, but selectValues() does not? Can anyone give me some insights on this?


      Thanks in advance,