Hi Everyone,
I am trying to create an app for SQL scripting on alteryx, if anyone can guide me that will be great.
Here's how I want it to be.
Step 1- where I can give the end user drop down to select table name(s)
Step 2- where I can select the column name(s)
Step 3- The script
Hi @duskyjayant
Alteryx doesn't provide any way to create a single dynamic interface, where the contents of one drop down is filtered or modified in any way by selections made in another one. This is because the UI tools are only configured once when the application starts up. Any time you have this kind of situation, you need to look into building a chained app, which a series of apps that run in sequence and present the UI elements at the launch of each app in the chain
In your case, the first app will present the table name drop down and pass the selection on to the second one, which will then display the available columns for that table. Once the user selects the columns, the second app can then build your SQL statement.
You can learn more about chained apps by going through the Interactive Training here.
One important thing to note though. Alteryx will throw a No columns returned error if the SQL that you execute does not return a valid result set. The SQL Create statements that you're using don't return a record set, so you'll need to add a dummy select statement afterwards and have Alteryx execute the entire thing at once.
Dan