1 Reply Latest reply on Oct 5, 2017 7:39 AM by Arthur Doe

    Question - how to automate filters via JS API?

    Arthur Doe

      There are already tons of tutorials on how to do filtering but I've run into the case I don't quite understand.


      So, this particular visualization has a filter called 'Portfolio', with two possible values ('Portfolio1' and 'Portfolio2'). We would like to hide this filter and drive it externally from another part of our application:



      In this first picture you can see portfolio drop down with values (this is part of the visualization itself) and then external, identical one that we would like to use to seer the visualization.



      Now, I'm going to grab that sheet and try to swap filters in a programmatic way ('qwerty123' is name of the sheet)


      When I try to apply the filter (switch from 'Portfolio1' to 'Portfolio2') then my report disappears and and drop down remains to be 'Porfolio1'


      Then when I toggle it back report re-appears



      There is another thing. Please note that when the report was first loaded only two filters were visible, i.e. 'clientName' and 'Valutation Date'. After this JS manipulation, I end up having a copy of the filter I was trying to automate. Why?



      This is not working as intended. What am I doing wrong?