Alteryx Designer Desktop Discussions

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

Building a Macro to replace SQL strings

Sam_Mathewson
5 - Atom

Hey y'all, I am working on a rate validation (comparing insurance rates for medical, dental, vision insurance to a rate sheet).  My company really likes it, and wants to be able to use it for future years, and more clients.  I am drawing the rates that are calculated for each participant through a query against our production, or real life data, database.  In the future, we will need to run this query against test databases, and using different activity dates/employment status dates.  This query that I am using is stored in the SQL editor page of the data input function (I pull data through an in-DB connection).  Does anyone know a way I could configure a macro so that people can simply input their database name and the effective date they want to query by, then click run?

 

Summary:  Need a "so easy a caveman could do it" way to replace a database string and a date string within a query stored in SQL editor, preferably not using the Dynamic Input function because that will require storing the SQL logic in an excel document that I think will get lost or corrupted over time

1 REPLY 1
echuong1
Alteryx Alumni (Retired)

For a "foolproof" method, I suggest creating an analytic app. You can have a user select from a drop down to update the value. 

 

For the dropdown, you can use the option to show a different value to the user than what is passed through. You can use the full path in the input tool to make it really easy for multiple people to use. I think the easiest way to get the full connection string is to set up an in-DB input and copy/paste from there.

 

echuong1_0-1603212459576.png

 

echuong1_1-1603212608695.png

 

Labels
Top Solution Authors