Qlik Community

Qlik Sense Integration, Extensions, & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
lokeshwer
New Contributor

How to get filter pane selections?

I have an extension that enables navigation with existing application. I need the filterpane selection info from my extension so that I can preserve the same experience in my app. In nutshell, I need to access the filterpane selection from extension.

Example:

Say I have drill down to select region (Americas), country (US) and state (Texas) using filter pane. Some how I need to get the user selection from my extension that is (Americas,US,Texas)

Hope I posted my problem clearly

1 Solution

Accepted Solutions
Not applicable

Re: How to get filter pane selections?

Hi,

You can get the current selections using the "getObjectProperties" method. Below is a code snippet for a simple extension that will demonstrate one way that this can be done.

I hope that helps.

Thanks

Nick

define( [

  "qlik"

],

function ( qlik ) {

  var app = qlik.currApp();

  return {

  paint: function ($element) {

  app.getObjectProperties("CurrentSelection").then(function(model){

              var html = "";

              var selections = model.layout.qSelectionObject.qSelections;

              for (var s in selections){

                html += "<label style='font-weight:bold;'>";

                html += selections.qField;

                html += ": </label>";

                html += selections.qSelected;

                html += "<br />";

              }

              $element.html(html);

            });

  }

  };

} );

1 Reply
Not applicable

Re: How to get filter pane selections?

Hi,

You can get the current selections using the "getObjectProperties" method. Below is a code snippet for a simple extension that will demonstrate one way that this can be done.

I hope that helps.

Thanks

Nick

define( [

  "qlik"

],

function ( qlik ) {

  var app = qlik.currApp();

  return {

  paint: function ($element) {

  app.getObjectProperties("CurrentSelection").then(function(model){

              var html = "";

              var selections = model.layout.qSelectionObject.qSelections;

              for (var s in selections){

                html += "<label style='font-weight:bold;'>";

                html += selections.qField;

                html += ": </label>";

                html += selections.qSelected;

                html += "<br />";

              }

              $element.html(html);

            });

  }

  };

} );