Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
shivalthaker26
Contributor
Contributor

Filtering a chart with API after retrieving Qlik Sense object

Hi all,

I'm trying to filter out a specific chart which is retrieved as qlik sense object. Once it is retrieved, I would like to filter out that particular chart to select specific values in a field. 

So far I've tried something like: 

app.getObject('MyAppNavigationToolbarDIVid', objctId).then(function () {

app.field(columnName).selectValues(columnValue, false, true).then (function (reply){

  });

} );

 

But this happens to filter out all other chart too. Can anyone provide some insight or any help how to filter out for a particular chart only and not all the charts? 

 

Thanks in advance, 

Shival 

Labels (3)
2 Replies
rbartley
Specialist II
Specialist II

Hi Shival,

The APIs work in the same way as if you were applying the function or property in Qlik Sense itself.  As such, all charts that you haven't defined to ignore selections by using set analysis will be affected by the selection.  So, you'll need to change your app.

 

Regards,

 

Richard

 

Aiham_Azmeh
Employee
Employee

Hi @shivalthaker26,

In Qlik Sense (and all other Qlik products), the selections are on app level, there is no dedicated mechanism for visualizations, however, you should be able to use AlternateStates and apply selections in different states for different charts or set of charts using the capability API's and selectionState method.

AFAIK, we do not have proper support for qState in the QApp.getObject method, so you will probably need to use Visualization API create method for your visualizations and then send in, in the HyperCubeDef the qState property name.

 

video explaining alternate state : https://help.qlik.com/sv-SE/video/LMMGAFgrnc8

I hope this helps