Alteryx Designer Desktop Discussions

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

Updating Multiple SQL Queries with Similar Statements

wdula
7 - Meteor

Screenshot of Multiple inputs Joined togetherScreenshot of Multiple inputs Joined together

 

Hello all,

 

I have a conundrum. Pictured above is the start of a workflow that creates a record of how often items have been used by our company as part of our contract renewal process. I've use this workflow atleast 3 times a quarter for different business units; the main pain point with it is that when I need to look up a new category of items, I have to change the same portion of the where clause in each input (they are all SQL queries to our Inventory database). 

 

For the sake of argument (and my sanity) let's assume I can't rewrite the queries to simplify the workflow but want to avoid manually change each where clause each time I open this workflow. How could I accomplish this?

 

My thoughts:

- Text input -> Dynamic Inputs

- Workflow Constants -> Formula Tool -> Dynamic Inputs

 

Thanks in advance!

2 REPLIES 2
apathetichell
18 - Pollux

turn this into a batch macro.

add a control parameter

attach action tool between control parameter and each input data tool.

have them set to replace specific string the sample value in your where clause (or your entire where clause if it's more dynamic).

 

in outerworfklow hook up value you are replacing with (or new where clause).

wdula
7 - Meteor

Can't believe that didn't cross my mind! That will work well since the only other piece of information that needs to be updated is the date ranges in some of the queries but I can handle that with another control tool, thanks!

Labels