Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi
PFA
On the Period Field, have a field 'HasValue' = 1 is Yes, 0 is No.
If the user selects "Select Periods" in the Button, I would like to apply the filter "HasValue = 1" to the Period Field.
If they select the opposite, I would like to clear that filter. (I cannot apply a Bookmark - they have been disabled on our system)
How do I do it?
Thanks!
I created an alternative to the variable based solution of @edwin , using select in field. Notice that sending an empty string as a search parameter clears your selection.
I used HasValue>0 in my IF because the sample application did not contain 1 and 0, it contained 2 and 0, my example will work for both scenarios.
need more info, this will depend. assuming that HasValue can only either be 1, 0. is the field set to always one selected? if neither is selected, did you want to set it to 1? is it possible for the field to be both selected? if so, what do you do?
if the field is always one selected (in one list box):
in action add select field
field: HasValue
value: if(only(HasValue)=1,0,1)
this gets complicated if it is not set to always one selected. you need to add if conditions for when no selection is made or when both possible values are selected like:
if(getselectedcount(HasValue)<>1, 1,
if(only(HasValue)=1,0,1
)
)
tweak that depending on your actual scenario
Hi Edwin,
Thank you so much for your reply.
So HasValue can have only one at a time selected...either 1, or it is cleared (HasValue=). If they have nothing selected, I want it cleared. Hope that makes sense.
Appreciate your assistance
I created an alternative to the variable based solution of @edwin , using select in field. Notice that sending an empty string as a search parameter clears your selection.
I used HasValue>0 in my IF because the sample application did not contain 1 and 0, it contained 2 and 0, my example will work for both scenarios.
Awesome Vegar! Thank you so much!