Skip to main content
Announcements
Applications are open for the 2024 Qlik Luminary Program. Apply by December 15 here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Krish2459_58
Contributor III
Contributor III

BUTTONS PLAY

Hi,

I have data like below image as Inline load.

In the frond end I have created two buttons(Button A and Button B) to categorize the column values as per the requirement.

Let's say when user click on both the buttons the filter (Category)should also select both values.

Krish2459_58_0-1686070522191.png

Could you please help me.

 

Thanks..

 

 

Labels (1)
8 Replies
Krish2459_58
Contributor III
Contributor III
Author

Hi,

Is there any approach to get this.

Thnaks...

snibrahim1993
Partner - Contributor III
Partner - Contributor III

Hi @Krish2459_58 

Please try like below

Create a variable in the Qlik Sense script to store the selected values from the buttons. Let's name it "SelectedValues":

SET vSelectedValues = '';


Assign an action to each button to update the variable "SelectedValues" based on the user's selection. Go to the properties of each button and add the following action:

For Button1:

  • Action type: Set Variable
  • Variable: vSelectedValues
  • Value: If(IsNull(vSelectedValues), 'A,B,C', vSelectedValues & ',A,B,C')

For Button2:

  • Action type: Set Variable
  • Variable: vSelectedValues
  • Value: If(IsNull(vSelectedValues), 'D,E,F,G', vSelectedValues & ',D,E,F,G')

These actions update the variable "SelectedValues" by appending the selected values to the existing values if the variable is not null, or initialize it with the selected values if it is null.

  1. Create a filter pane object in the Qlik Sense sheet to display the Category field. Set the filter pane to use the variable "vSelectedValues" as its field. This will dynamically apply the selected values from the buttons as the filter.
Regards, Mohamed Ibrahim.
If this resolves your Query please like and accept this as an answer.
Krish2459_58
Contributor III
Contributor III
Author

Hi @snibrahim1993 

Thanks for your response.

FolIowed the steps but it's not working like when I click on the button.Nothing happens.Here is the logic.

SET vSelectedValues = '';

=If(IsNull(vSelectedValues), 'Property,Property Street,Suburb,City,Region,District,Property Co-ordinates,Property Manager,Property Type,Property Status,Property Sqm’,

vSelectedValues & 'Property,Property Street,Suburb,City,Region,District,Property Co-ordinates,Property Manager,Property Type,Property Status,Property Sqm ')

 

Thanks..

 

 

 

 

 

Krish2459_58
Contributor III
Contributor III
Author

Hi,

Any suggestions please.

 

Thanks..

snibrahim1993
Partner - Contributor III
Partner - Contributor III

@Krish2459_58 Can you please share the expected result. So I can help you on that

Regards, Mohamed Ibrahim.
If this resolves your Query please like and accept this as an answer.
Lokesh_5045
Creator
Creator

@Krish2459_58 

Step1: Create button and add action - Select values matching search criteria
Step2: In value, write expression like this - '(a|b|c)'

Lokesh_5045_0-1686167736163.png

Step3: Create another button for other selections - d, e, f, g in same manner.

Lokesh_5045_1-1686167814583.png

Above picture: Button 1

Lokesh_5045_2-1686167875451.png

Above picture: Button 2

Krish2459_58
Contributor III
Contributor III
Author

Hi @Lokesh_5045 

When we select two buttons the should append in sted of override.

Like in the avove case if two buttons were selected the category filter should have selected both button vales(a,b,c,d,e,f,g)

 

Thanks..

 

Lokesh_5045
Creator
Creator

@Krish2459_58 Try button action - Toggle field selection

keeping the values as like above.