Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
jenriquez
Contributor III
Contributor III

How to display in HTML all the value of get selections using extensions

Hi, I'm new to Qlik Sense and can't figure out the right code to display the get selected items on the div or front end view of a extension.

Below is the code that I'm using. (I'm using Extension for Qlik Sense desktop)

extSelect.PNG

I can get the selected value with this code and display it on the browser console.

I have searched and have not find one of any documentation or examples of  displaying the selected value on a Qlik Sense Extensions. I have some requirements regarding how the selected fields should look. Below is the sample selected fields should look when a field is locked the object will go orange.

this should be look of filter selectedthis should be look of filter selectedthis should be look when a field is locked the objectthis should be look when a field is locked the object

Can anybody help me with the right code syntax?

Labels (2)
1 Solution

Accepted Solutions
ArnadoSandoval
Specialist II
Specialist II

Hi @jenriquez 

I did shared the extension above, I am attaching it again to this reply.

Arnaldo Sandoval
A journey of a thousand miles begins with a single step.

View solution in original post

6 Replies
ArnadoSandoval
Specialist II
Specialist II

Hi @jenriquez 

I can share with you how to pass the front-end UI's current selections to an extension, as long as the extension has a property to receive these values.

I will be using the QlikSense function GetCurrentSelections - chart function 

I attached the extension ShowSelections (zipped) to illustrate the code;  its code is very similar to yours with the difference of implementing a property: My current selections, when you assign the function GetCurrentSelections(), the current selections are found in the extension script variable: layout.myproperties.myCurrentSelections; as shown

Current-Selections-02.png

The QlikSense UI used is shown next:

Current-Selections-01.png

The corresponding output at the DevTools console:

Current-Selections-03.png

Another option:

You may also implement QlikSense API calls, but I do not have experience implementing extensions' consuming them, so, if you manage to use QS API please share with me !!!! here the link: Get the current selections 

hth

Arnaldo Sandoval
A journey of a thousand miles begins with a single step.
ArnadoSandoval
Specialist II
Specialist II

Hi @jenriquez 

I forgot to attach the extension !!!

 

Arnaldo Sandoval
A journey of a thousand miles begins with a single step.
jenriquez
Contributor III
Contributor III
Author

hi @ArnadoSandoval 

can you share your extension here? thanks in advance.

jenriquez
Contributor III
Contributor III
Author

hi @ArnadoSandoval 

Thank you 😊

ArnadoSandoval
Specialist II
Specialist II

Hi @jenriquez 

I did shared the extension above, I am attaching it again to this reply.

Arnaldo Sandoval
A journey of a thousand miles begins with a single step.
jenriquez
Contributor III
Contributor III
Author

hi @ArnadoSandoval 

Thanks for your help, much appreciated. I used your code on how to display the selected fields on HTML code.

below is my code.

jenriquez_0-1604376336476.png