Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Community is experiencing an influx of spam. As we work toward a solution, please use the 'Notify Moderator' option on the ellipsis menu to flag inappropriate posts.

Alteryx Designer Desktop Discussions

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

Formula to assign value if workflow is run at a certain time??

Deano478
12 - Quasar

Hi Alteryx Crew,

 

I'm currently having what could possibly be a simple problem to solve I just cant see a solution to it. Basically What I'm trying to do create a formula that when my workflow runs between the hours of 14:00 and 15:00 it will assign the value 'Deadline 1' to my data.

 

However if the Workflow is run before 14:00 or after 15:00 then I just want the workflow to stop.

 

I hope I was able to explain myself well enough if not i'll do my best to provide any additional info. A huge thanks to you all in advance.

 

Kind regards,

 

Dean 

5 REPLIES 5
DavidSkaife
13 - Pulsar

Hi @Deano478 

 

This should work for you, if you add it to the start of your workflow:

 

DavidSkaife_0-1670515918248.png

 

Using the Message tool to stop downstream proccessing if the date condition isn't met:

 

DavidSkaife_1-1670515967184.png

 

Deano478
12 - Quasar

Hey @DavidSkaife,

 

I attached a screenshot I don't think I added it to my WF properly should I have implemented this in a different way? 

 

Untitled.png

 

DavidSkaife
13 - Pulsar

Hi @Deano478 

 

Instead of Union try Appending it. That will add the result "Deadline 1", if applicable, to all rows. 

 

Personally i'd append it before the first Select tool, that way nothing else processes.

 

Is it working correctly?

Deano478
12 - Quasar

@DavidSkaife you my friend are a genius ahaha i appended it now and boom its working thank you so much 

DavidSkaife
13 - Pulsar

@Deano478 you're very welcome!

 

Credit to @JosephSerpis as well for telling me about using the Message Tool in this way a while ago :)

Labels