You are viewing limited content. For full access, please sign in.

Question

Question

How to make an gateway check to see if "needed by date" is less than 7 days away?

asked on May 21, 2024

Currently I am making a Payment Request Form that is approved by the accounting office along with any other necessary approvals. After all the approvals, it sends the submitter an email saying that they have been approved.

But, I need the form to go back to the accounting office once the "needed by date" is less than 7 days away so that the office can enter the batch number before being saved to the repository. I'm a bit confused on how to make this possible.

0 0

Answer

SELECTED ANSWER
replied on May 21, 2024 Show version history

Another option would be to create a User Task the flow goes to after the email is sent. On the User Task, attach a timer event and have it set for 7 days before\after your "needed by date" variable and then add a path out of the timer event back to your accounting office user task. You could assign the user tasks to the admin account another account.

3 0

Replies

replied on May 21, 2024

You've tagged this post as Workflow but your actual question is referring to Forms and Gateways (which are Forms terminology), so I'm going to address a Forms response here:

I would create a second date field on your form (you can even hide it, just make sure it is set to save its value even while hidden) that has a formula to determine the date 7 days prior to your "needed by date" field.  Then you can set the gateway to compare based on that second date field instead of trying to build calculations directly into the gateway.

A formula like this should work.  This checks against the needed_by_date field (assuming that is the variable).  First it checks if needed_by_date is blank, and if it is, this field will be set as blank too.  Otherwise, it subtracts 7 days from the needed_by_date. 

=IF(needed_by_date="","",needed_by_date-7)

 

If you were actually talking about Workflow, then the "Date Token Calculator" activity is what you need to figure out the date 7 days prior calculation.  This will make a specific token that you can then use for various conditional evaluations.

2 0
You are not allowed to follow up in this post.

Sign in to reply to this post.