4 Replies Latest reply: Oct 2, 2017 3:11 AM by Richard Bartley RSS

    Sense Mashup API Selecting on one field removes selection on another

    Richard Bartley

      Hello everyone,


      I am experiencing some rather odd behaviour in my mashup.  I have the following code on my page, which is intended to change the selected year when the value is changed in a drop-down list ( I am not using the Qlik filter pane because the user should only be able to select one value, something that I don't think that the standard Qlik field filters are capable of).


      Anyway, when I load the page, I filter on two fields (pig category and year) and this works fine, but when I select a new value in the drop-down list, it filters the year correctly, but removes the filter on Pig Category (Price).  While testing, I added lines 8 to 13 below and this re-applies the filter on Pig Category (Price), but not on the first change. 


        var intSelectedYear;
        intSelectedYear = Number(event.target.value);
        app.field("[Year (Price)]").selectValues([intSelectedYear],false,true);
        app.field("[Pig Category (Price)]").selectValues(['Piglet'],false,true);


      I have de-bugged the code in IE's developer console, but I cannot see anywhere where a call to remove the filter is made.  I have also tried all the combinations of false and true associated with the selectValues method, but nothing seems to work.


      Anyone have any ideas?


      Thanks in advance