Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Filter by Radio button

markashman
9 - Comet

I have a boolean field that denotes an active status of data. I want to filter by based on user input, with the choice being: Yes, No, Both.

 

I know I can do this by having 3 different paths via control containers, but that means a lot of duplicate code for no good reason, but I cant for the lift of me figure out how you can pass this into a filter tool base on a formula, along the lines of: IF [#1] THEN "Yes" ELSEIF [#2] THEN "No" ELSE "'Yes','No'" ENDIF.

 

Anyone done something like this before?

2 REPLIES 2
SPetrie
13 - Pulsar

 

Your update expression would be along the lines of if [#1] then '[Values] = "Yes"' elseif [#2] then '[Values] = "No"' else '"True"' endif

You are replacing the entire formula used in the filter tool so its wrapped in single quotes.

This assumes [#1] is the yes radio and [#2] is the no. You dont need to even attach the "both" radio to the action tool since its the else condition, but I did since it help visually to know its part of the selection process.

1.PNG

2.PNG

3.PNG

4.PNG

Hope this helps

markashman
9 - Comet

Thanks, I had managed to figure it out in the end, much like the above, next challenge is dynamically show/hide the column based on the same inputs, but that is something for another day.

Labels
Top Solution Authors