Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Alteryx Designer Desktop Discussions

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

Dynamically write query based on User Input in App

jordanmount6
8 - Asteroid

Is there a way to have a query write in where clauses after the user selects and inputs text in the interface when they go to run the analytical app?

 

Example: Text Box Tool: What Color do you want to query for? The User types in Blue

 

I want my query in the dynamic input tool to write in under the where clause: and color = 'Blue'

 

 

             

4 REPLIES 4
apathetichell
20 - Arcturus

I do this with dynamic input in-db. Basically have your query in a text input and have the action tool change/add whatever dependencies you want for your query. I'd recommend using a list box or drop down though to lock the user into the kinds of fields/values which should appear in your WHERE clause.

AngelosPachis
16 - Nebula

Hi @jordanmount6 ,

 

@NicoleJohnson has written a blog on this that might seem handy to you and answer a few of your question. Adding the link below if you haven't come across it already

 

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

jordanmount6
8 - Asteroid

So i've made a workflow with a check box that is grouped with an action tool for a text box so they can select what they want to query for but my problem comes in when alteryx doesnt like commented out lines in the sql. 

jordanmount6
8 - Asteroid

Thank you @AngelosPachis that is what i am looking for. Appreciate you

Labels
Top Solution Authors