Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Breezy
Creator II
Creator II

How to change button color based on selection?

Hello, below I have three buttons. I need it to be so that when I click a button the color will change to demonstrate it is clicked. In the example below I clicked 2022 and the button changed to gray. 

Breezy_0-1673282088241.png

 

Labels (1)
10 Replies
Lemac
Contributor III
Contributor III

In the background properties of the button, define this:

=if(WildMatch(GetCurrentSelections(), '*2022*')>0, '#DDDDDD', '#009845')

If you do it like this, you bypass all the quotes and blocks and stuff.  It works a little differently though; if you have anything with 2022 selected it will turn grey. (e.g. CustomerNo='100202238'... it will turn grey. )