Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

OPTION TO LEAVE TEXT BOX BLANK IN ANALYTIC APP

bb213
8 - Asteroid

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. 

 

 

5 REPLIES 5
Claje
14 - Magnetar

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!

CharlieS
17 - Castor
17 - Castor

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.

bb213
8 - Asteroid

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?

CharlieS
17 - Castor
17 - Castor

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.

Claje
14 - Magnetar

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!

Labels