Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Guys,
I'm working on Qlik View..
I have created 4 buttons: both the couples select values from 2 different fields.
The first field is called "Regulated" and can return values : "YES / NO" ( one button select the regulated countries, the second one the non-regulated).
The second field is called "STOCK?" and can return values: "YES / NO" (the first button select all the countries YES, the second one select ALL the countries -so YES+NO).
These buttons has been set in order to change color, being grey normally and becoming green when clicked.
To do so, I have created 4 variables: butREG, butNOREG, butONLYCOUNT and butALL.
Each button has the following instructions:
select in the field
set butNAME (related button)=1,
and their color is set to If(button(related button) = 1, RGB(0, 255, 0), RGB(224,224,224))
I have also added the instruction =if(IsNull(GetCurrentSelections()), 0) for each button, in order to make them all grey in case you clear the selections.
The issue is that when click on two different button (not complementary selection) the first one return to be grey, even if the selection is still active!
For example, if I filter all the regulated countries + "yes stock" I want to see both the button green.
Do you know how to fix it?
Thank you in advance
Instead of using variables for the colors why don't you just do this in your color expression.
=If(GetFieldSelections(Regulated) ='YES', RGB(0, 255, 0), RGB(224,224,224))
And just modify it for each button.
Can you provide sample application
Hello,
see attached a sample
Hi,
I think the issue is that once I change the value of another variable, the remaining ones turn to be "-".
Is there any way (using the events maybe) to set the instruction : keep the variable value ?
Thanks
Instead of using variables for the colors why don't you just do this in your color expression.
=If(GetFieldSelections(Regulated) ='YES', RGB(0, 255, 0), RGB(224,224,224))
And just modify it for each button.
Thank you,
it works perfectly
Bye