Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Greetings for the day!
I have a requirement that I created a button in my qlik sense sheet where if I click on it it should display in red colour else it should be in blue colour.
Any suggestions will be highly appreciated.
Thanks,
Raju
Hi @Raju_6952 ,
1. Create a variable. In my case, `vButtonToggle`.
2. Drag in a Button object.
3. Add an action for "Set variable value".
4. Set the variable to `vButtonToggle`. Set the value to `=If($(vButtonToggle),0,1)`.
5. Under Presentation -> Styling -> Chart, set the background color to "By expression" with the expression "=If($(vButtonToggle),Red(),Blue())". These can be any RGB or ARGB colors of your choice.
Each time you click on the button, it will toggle between Red and Blue. Is this what you are asking for? If you don't want it to toggle but just be a one time action, modify Step 4 to have the expression just equal `1` so it only sets it once. You could then have it reset another way like each time you land on the sheet with a Sheet Action.
Cheers,