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

Toggle Button

I want to be able to use a button to toggle fields in a table ON and OFF.  In essence, allowing the user to customize what he/she wants to see. Is there a way to do this with the button object?

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Yes, you can use a button for this.

In the button properties, you could create an action that will toggle variable (I will call this variable vToggle):

Actions -> Add-> Action Type: External --> Set Variable

Then you enter the variable name (the variable should be created in Variable Overview in Settings menu also), and as expression something like

= if(vToggle = 0,1,0)

In the properties of the straight table object in presentation tab, enter this variable as conditional to show the selected column

=vToggle

Hope this helps,

Stefan

View solution in original post

3 Replies
swuehl
MVP
MVP

Yes, you can use a button for this.

In the button properties, you could create an action that will toggle variable (I will call this variable vToggle):

Actions -> Add-> Action Type: External --> Set Variable

Then you enter the variable name (the variable should be created in Variable Overview in Settings menu also), and as expression something like

= if(vToggle = 0,1,0)

In the properties of the straight table object in presentation tab, enter this variable as conditional to show the selected column

=vToggle

Hope this helps,

Stefan

Not applicable
Author

Thank you so much! I got it work.  Before I was just doing  =if(vToggle = 0,1).

Not applicable
Author

Nice!