Join the Inspire AMA with Joshua Burkhow, March 31-April 4. Ask, share, and connect with the Alteryx community!

Alteryx Designer Desktop Discussions

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

Validating the date in date interface tool

Inactive User
Not applicable

I am using date interface tool to select last day of the month and run the workflow but want to bring a control that only last month of the day is selected to run the workflow.

 

I tried to add an error message to stop if the last month of the day is not selected but couldn't crack correct expression.

 

Please suggest correct option to my solution.

3 REPLIES 3
aatalai
14 - Magnetar

A bit of while since I played with interface tool, but thinking more of a work around, could you not set it that the user only gets to pick the month and in the workflow it sets it to the end of the month. Or alternatively they input whatever date, but again in the workflow you convert it to the end of the month.

 

@Inactive User would that work?

Inactive User
Not applicable

My workflow is built to work on date mode i.e., any date but for accurate results i want the user to select last day of the month if wrong date selected I need an error message that not the last day

 

In second option which you mentioned which tool I could use after date interface face tool to select last day of month?

 

Because after date interface tool I have action tool to run.

danilang
19 - Altair
19 - Altair

Hi @Inactive User 

 

Connect an Error Message interface tool to the Q output of the Date tool.  In the Expression box enter 

[#1] != ToDate(DateTimeTrim([#1],"lastofmonth"))

This compares the selected date with the last date in that particular month.  If they don't match it throws an error and the user has to select another date.

R.png

Dan

 

Labels
Top Solution Authors