Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Can a Workflow Constant be used as an Input Data Tool Criteria?

wiggot
7 - Meteor

Easy example, I've got a StartDate and an EndDate for the select criteria, which would be "WHERE AGING_DATE Between Startdate and EndDate". I'm trying to avoid having users go into the Input Data Tool EVER... their grubby little hands will mess everything up.

 

Since there doesn't seem to be a way to pop-up a user input window at runtime, to make the criteria variable, I'm trying the route of setting all of the constants that I need and then just referencing them from within the Input Data Tool. That keeps the user from going into the query, itself - they just have to change the constants from one run to the next.

 

Is this possible?

2 REPLIES 2
Claje
14 - Magnetar

This absolutely works!

As an example, if you have a User constant named "Startdate" and one named EndDate you could use the following

 

WHERE AGING_DATE Between '%User.Startdate%' and '%User.EndDate%'

You could also use a Declare statement and set each value using the same syntax eg:

Declare @Startdate Date
Set @Startdate = '%User.Startdate%'
Thorsty1
7 - Meteor

Thanks for posting this solution.  Huge help!

Labels