Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

How to dynamically change the table name

Hello Alteryx Community ,


In order to have re-usability of existing workflows , I would like to have my input changed dynamically within the workflow so that I can use same workflow with different input. My input is a table in SQL Server , so depending upon a condition I would like to fetch data from Table A or Table B. I know we can certainly do this creating a macro but I would like to avoid using macro in this case. 


Is their a way by which I can dynamically change the entire table name , I have used dynamic Input in past but I don't think so we can use it for replacing a table name . 


Your help would be appreciated . 


Hi Mihir,

There are 2 ways you could go about this. Info below to get you started.

1. Create an analytic app- use a text box linked with an action tool. Action tool is connected to the Input tool. Configure action tool to update table name based on user entry into text box. This is helpful if your condition is based on user input

2. If your condition is a result created from the workflow, then you can use dynamic input. Configure the tool using the 'modify sql query' wherein you can replace a specific string with the name of your table







Hi @brindhan,


On the option 2, how can I replace a specific string with the name of my table?




Hi @apichart Ensure that the table name string is an input field, eg 'Table'. You can use the option within dynamic input - 'Modify SQL query' and within that, 'Replace specific string'.