I am trying to pass a user defined year into the SQL editor input tool using reference shortcuts. I have created my two variables via the Numeric Input tool named Beg_Year and End_Year. I have updated the code in the SQL editor so the where clause reads
WHERE year BETWEEN %Question.Beg_Year% and %Question.End_Year%
but when I run the app the query error's out returning no results and the error message shows that the reference shortcuts are not passing the year variables into the code.
Am I doing something wrong here or is the SQL editor not meant to support reference shortcuts?
Solved! Go to Solution.
If you're trying to make a workflow dynamic, I recommend either creating an analytic app, or using the dynamic input.
For the analytic app, create your workflow with a "base case." I'm filtering for a customer ID, but you can use the dates in here too. You can then update each portion with an interface tool and an action tool for the min and max dates.
For the dynamic input, you'll start with a text input that has placeholders for your two dates. Then in your dynamic input you'll build that "base case." Go to modify SQL Query and add the necessary modifications. You can either modify the entire where clause all at once, your you can choose a specific string like I did.