Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Dante_83
Contributor III
Contributor III

Change button' s colors when pressed

Hello Experts,
I'm trying to create buttons that change colors when pressed. For example, I want to create a YES and NO button. When the Yes button is pressed, it changes color to green, and the No button changes to Grey. Vise versa, When the No button is pressed, it changes color to Brown. Does anybody know if Qlik Sense Desktop has that capability? Thank you in advance for the help.

Labels (1)
1 Solution

Accepted Solutions
abhijitnalekar
Specialist II
Specialist II

Hi @Dante_83 ,

You need to add action in the button property as a set variable value and set it to the one variable.

like below one for Yes button and same for No button

abhijitnalekar_0-1655404933586.png

 

abhijitnalekar_1-1655404933332.png

 

then write a below expression in background color expression as below

abhijitnalekar_2-1655404933338.png

 

for NO button: =if(name='NO',Red(),Brown())

for YES button: =if(name='YES',green(),Brown())

Regards,
Abhijit
keep Qliking...
Help users find answers! Don't forget to mark a solution that worked for you!

View solution in original post

2 Replies
abhijitnalekar
Specialist II
Specialist II

Hi @Dante_83 ,

You need to add action in the button property as a set variable value and set it to the one variable.

like below one for Yes button and same for No button

abhijitnalekar_0-1655404933586.png

 

abhijitnalekar_1-1655404933332.png

 

then write a below expression in background color expression as below

abhijitnalekar_2-1655404933338.png

 

for NO button: =if(name='NO',Red(),Brown())

for YES button: =if(name='YES',green(),Brown())

Regards,
Abhijit
keep Qliking...
Help users find answers! Don't forget to mark a solution that worked for you!
Dante_83
Contributor III
Contributor III
Author

Hello Abhijit,

I appreciate your help and it works, thank you.