Alteryx Designer Desktop Discussions

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

Optional field - Alteryx app with SQL queries

Joker_Hazard
11 - Bolide

Hi all.

I am trying to create an App which queries from a database, and takes multiple inputs using the Text Box and Action tools. But, I don't always want the query using all of the action tools. I want some of them to be optional. 

 

For example, I would like to possibly only enter the Banking Account Field and Dates , leave the other fields blank, and have the query just execute on both of them. Is this possible?

I can create on my if statement all possibilities of queries because we have more than 1000 thousand banking accounts and the other fields have an equal number of data.

Is there a cleaner way to do that? 

I tried adding a random string in my select for it to substitute for the banking account that the user inputs into the app, but IF he does not input anything, this string will break my query.

Thank you!

2 REPLIES 2
DataNath
17 - Castor

If I’m understanding the question right, it sounds like you just need to use a radio button, with your text box that they use to enter the banking account nested inside of it. Then you put your filter inside a container on its own, with the radio button linked to that. When the user comes to use your app, if they select the option to show the text box/baking account filter, it’ll unlock/activate the container in the workflow and the filter will run. If not, the container will stay locked and won’t filter on banking account. More info here: https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Radio-button-enable-disable-container/...

Joker_Hazard
11 - Bolide

Hi DataNath. 

Almost that! I want to link this optional choice on the query instead of the container. 


There is only one query, so all optional fields would be connect to it with multiple WHERE clauses. If it was a container I think would be much easier.

With that in mind, do you still have some recommendation? 

I saw this post here:https://community.alteryx.com/t5/Engine-Works/Creating-a-Custom-SQL-Query-Builder-App/ba-p/893385 

But I still have many doubts

Labels