Alteryx Designer Desktop Discussions

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

Dynamic Values

JDong
8 - Asteroid

Hi All @Jonathan-Sherman@atcodedog05  @Qiu  

 

 

I have a SQL query and extracting data for my flow using the input tool.

 

 

Now I have defined a where clause that says City = 'SF'

 

SlNoValueCity
1100SF
2200Manila
3300London
4400Beijing
5500Perth

 

 

How can I actually replace the SF and parameterize this on runtime. So at runtime user can select the City and pull only that data from the query.

 

Can you please advise ? Thanks

7 REPLIES 7
Jonathan-Sherman
15 - Aurora
15 - Aurora

Hi @JDong,

 

You'll want to use a dynamic input tool to solve this.

 

The dynamic input tool works in a similar way to the standard input tool, start off by adding your query and connection string in the "Input Data Source Template" (by clicking edit). The main difference between this tool and a standard input, the dynamic input takes an incoming connection (in this case would be the city value you want to pass into the query), we can then modify the SQL query through the configuration pane of the tool.

 

Select "Modify SQL Query" -> "Add" -> "SQL: Update WHERE Clause"

 

Jonathan-Sherman_0-1611669312626.png

 

 

Jonathan-Sherman_1-1611669351970.png

 

 

This will pass the new City value into the query and dynamically edit the WHERE clause you selected. If you have any questions just let us know!

 

Kind regards,

Jonathan

JDong
8 - Asteroid

@Jonathan-Sherman 

 

Thanks. The datasource I am querying has a where clause and I want to replace the 'city' condition with a runtime variable.

 

I tried using the dynamic input tool but it asks for connection details.

 

Can you please advise ?

Jonathan-Sherman
15 - Aurora
15 - Aurora

Have you managed to read your SQL query using a standard input tool?

JDong
8 - Asteroid

@Jonathan-Sherman 

 

It is throwing an exception when I try the standard input and configure.

 

It works perfectly with the Salesforce quick connect connection.

Jonathan-Sherman
15 - Aurora
15 - Aurora

You are able to go through the same quick connection option in the Dynamic Input tool also. Edit -> Dropdown -> Data Source -> Salesforce Quick Connect?

JDong
8 - Asteroid

@Jonathan-Sherman 

Gallop_1-1611675315607.png

 

I see the above on replacing my connection and using dynamic input tool. For some reason the custom query does not work as expected. Please advise.

 

The query validates fine !

 

JDong
8 - Asteroid

@Jonathan-Sherman 

 

I used one of the deprecated input connection for Salesforce and the initial connection reads fine...but I am not able to configure the input template for dynamic input tool. Also on trying to configure it disconnects from the 1st input (deprecated) tool.

 

Any thoughts here please ?

Labels