How to create a date range interface that limits the min date and max date?
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I want my user to select the "from date" and "to date", and i should be able to set the minimum date and maximum date limits. Is it possible in Alteryx?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Don't think there is a way to limit it within the tool, but you can add an Error Message tool to check that the date selected is between specific dates... that way if someone picks something outside those parameters, they will receive a warning letting them know which dates should be selected between (i.e. you can create the error message telling them the date parameters)?
NJ
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
As @NicoleJohnson described, you can use the Error Message Tool to establish the limits for dates.
Cheers,
Mark
Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks for the replies, I have used Error tool, but its not working. Am i doing correct here?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
are you looking for a past date only?
If this is true, then display error message, that's the expression that will cause the error to display.
Also, the input date is likely a DATE, while the datetimenow() needs to be formatted as %Y-%m-%d. Otherwise, you might have a problem.
[#1] < DateTimeFormat(DateTimeNow(),"%Y-%m-%d")
Cheers,
Mark
Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
When you say that it isn't working, are you testing it as an app and it isn't working? i.e. using the "magic wand" icon next to the Run button and seeing if the error message pops up after selecting a date after today's date? What specifically are you seeing that isn't working? If you just run the workflow (rather than the "wand"), nothing will appear in your workflow results, have to run it as an app.
Also, I see you are using DateTimeNow() in your formula rather than DateTimeToday(). It appears to work both ways (or at least it will if you format it like @MarqueeCrew!), but when I'm not comparing time in a workflow, I usually opt for DateTimeToday() to return just the date instead of the datetime.
NJ
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@NicoleJohnson , yes i am running with "magic wand", but i forgot click finish, I taught it will display error message as soon as i select wrong option. Thanks for your time.
