The Alteryx Community is a finalist in three 2026 CMX Awards! Help us win Customer Support Community, Most Engaged Community, and User Group Program of the Year - vote now! (it only takes about 2 minutes) before January 9.
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

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
Top Solution Authors