Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I would like to set up a Button that can toggle three possible selections on the same field.
1) Field = a value of 'A'
2) Field = a value of 'B'
3) Field Clear ( i.e. no selection )
I can do this with a list box but a button just looks better.
However I have not been able to find a combination that does all three on one button.
I can add 'Select In Field' and set the Search String to =if(MyField=A,B,A) but this just toggles between A and B.
I can do the same thing by adding two Toggle Select entries. One where the Search String is equal to 'A' and one where it is equal to 'B' but I can't figure out how to add the third option of no selection. I tried adding a third 'Clear Field' action but this takes priority over the two Toggles for some reason.
Anybody any ideas?
Please try this expression in "Select in Field":
=if(
IsNull(GetFieldSelections(MyField))=-1,'A',
if((GetFieldSelections(MyField))='A','B'
)
)
Please find the attached QVW
Have not tested it, but may be this:
If(MyField = 'A', 'B', If(MyField = 'B', '', 'A'))
Please try this expression in "Select in Field":
=if(
IsNull(GetFieldSelections(MyField))=-1,'A',
if((GetFieldSelections(MyField))='A','B'
)
)
Please find the attached QVW
That's quite magnificent!
I didn't know '-1' is used for non-selection and only had a vague idea over GetFieldSelections use so that's a great little example.
a