This is an app I made that filters a set of job announcements.
How do I leave the text box blank in an analytic app so that it still returns the correct values? In other words, if I leave the text box blank, I want it to act as if that particular filter isn't being applied.
For example, if I put "python" in the first box, and nothing in the second, it should return 3 records.
Solved! Go to Solution.
Hi,
Your workflow was very close. I updated your two Action Tools that were connected to Text Input tools to use the option "Update Value with Formula".
The template I used for this formula was as follows:
IF ISEMPTY([#1]) THEN '1=1' ELSE REPLACE([Destination],'KEYWORD',[#1]) ENDIF
[#1] Is the input from your text box, and [Destination] is the tool that Action is updating.
So this says - if the text box is empty, replace the filter with 1=1, which is always true. Otherwise, replace the keyword (ALTERYX or WASHINGTON in your example) with the result of the text input.
Hope this helps!
Update Action(62) to "Update Value with Formula" and use this formula:
IF isempty([#1]) THEN '1'
ELSE 'contains([Description],"'+[#1]+'")'
ENDIF
So if the text input is empty, all records will pass. Otherwise the contains function will be applied.
Thanks to you both. Both solutions worked. Is there a methodology for who I should choose as best answer? Is it just the first correct?
I'm glad you got the help you were looking for. If multiple solutions of like quality are offered, then the first posted is typically awarded the solution. I think multiple solutions could also be awarded. I would make sure @Claje gets a solution for this.
You can actually mark multiple posts as a solution, so if you found each of our posts helpful, feel free to mark them both as a solution!