Filter by Radio button
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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?
Solved! Go to Solution.
- Labels:
- Interface Tools
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
Hope this helps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
