Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Community,
I have created buttons that use the Action "Select in Field'.
The first button is when '1' is selected, the second when '2' is selected, and the third when >2 is selected. The data range in this field is 1 - 10.
Now I would like to conditionally format those buttons to change color when clicked. For 1 and 2 they are working well but for >2 I am having difficulty getting it to work.
These are the expressions I use:
If(GetFieldSelections([Range])=1,RGB(5,66,117)) for value 1
If(GetFieldSelections([Range])=2,RGB(5,66,117)) for value 2
If(GetFieldSelections([Range])>2,RGB(5,66,117)) and is meant to capture anything greater than 2.
But the third color formatting is not working.
Any ideas on how I can reconstruct the expression?
Thanks in advance!
Hi Zoe,
attached a second version that you can improve if you want.
So the idea is :
1- I have created several variables to identify the active button
2- then for Button Actions i add a Set variable action that allows to save the variable state
then for the function :
If(GetFieldSelections(Range)=1 and B1=1,RGB(5,66,117),RGB(0,0,0))
Hi,
can you check the attached file.
I didn't find any problems with the formatting.
If(GetFieldSelections(Range)=1,RGB(5,66,117),If(GetFieldSelections(Range)=2,RGB(50,66,230),If(GetFieldSelections(Range)>2,RGB(50,0,230))))
notice that you put the same RGB color code
Hi Taoufiq,
Thanks for the quick response.
So the idea is to have three different buttons that when not active they are a neutral color.
When the first button is clicked (value 1), its color changes to show that it is active.
When the second button is clicked (value 2), its color changes to show it is active, and the other two buttons remain in the neutral color.
When the third button is clicked (value >2), its color changes to show it is active, and the other two buttons remain in the neutral color.
Hope that helps.
Hi Zoe,
attached a second version that you can improve if you want.
So the idea is :
1- I have created several variables to identify the active button
2- then for Button Actions i add a Set variable action that allows to save the variable state
then for the function :
If(GetFieldSelections(Range)=1 and B1=1,RGB(5,66,117),RGB(0,0,0))