Join the Alteryx Community’s Maveryx Summer Cup event! Compete, network with others, and earn your gold through a series of challenges from July 24th to August 11th. Learn more about the event here.

Alteryx Designer Desktop Discussions

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

Use Dynamic Input with Pre-SQL Statement to update table

dpakapd
8 - Asteroid

Hello,

I have an input table that looks similar to the Text Input shown below.

 

dpakapd_0-1654003869361.png

 

 

In my workflow I am feeding the output of the 'Text Input' to a 'Dynamic Input' tool. The 'Dynamic Input' tool is configured to connect to an IBM DB2 database.

 

I want to run a pre-SQL command in order to update a table in a database where only the values in DIV_NBR are updated to the corresponding STAT_CD.

 

dpakapd_1-1654004116676.png

 

 

If I use an 'Input' tool, I am able to do this as I can specify which DIV_NBR I want updated. Since the DIV_NBR can change dynamically (in the real application the Text Input will be replaced by an Excel file), I want to configure the Dynamic Input such that it takes the 'DIV NBR' and uses it to update the table for the corresponding DIV_NBR.

 

Is there a way I can do this? I have attached the sample workflow here. Can you pl advise if this is possible?

 

Thanks.

2 REPLIES 2
phottovy
13 - Pulsar
13 - Pulsar

Hi @dpakapd ,

 

I don't believe there is a way to update the pre-sql statement directly in the dynamic input tool but you can dynamically update it by creating a pretty simple macro. Attached is a simple example where you can feed a query into the macro which will overwrite the pre-sql statement in the input tool inside the macro.

 

Action tool configuration:

phottovy_1-1654006443795.png

 

dpakapd
8 - Asteroid

Thanks Phottovy! 

Labels