Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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
Author

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);

            });

  }

  };

} );

View solution in original post

1 Reply
Not applicable
Author

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);

            });

  }

  };

} );