Can you purposely delay a workflow? I have a ...

(M. Engel) #1

Can you purposely delay a workflow? I have a workflow sending out emails when an action is performed. Works great! However, I want this to happen only once. I can format this behaviour to happen on ‘Updates only’, so when another action on a different column in the same table is performed and the situation in the original column is still ‘TRUE’ (or the same, actually) a second email goes out, that I do not want.

I was thinking I could design a second workflow to change the data to ‘untrue’ (or ‘SENT’ , if you want), but I am not sure if these workflows will contradict, happen in reverse order or even simultaneously. The action to change the data to ‘SEND’ happens first, of course. The second workflow depends on an action that is not displayed. So, I was thinking of putting a delay of let’s say 1 minute on this other one. I hope I am making myself clear. And also: perhaps there is a much easier way to do this, that I don’t know of.

(Suvrutt Gurjar) #2

Hi @M_Engel, Does the approach defined under the section “Sending Email When a Row is Updated to Have a Specific Column Value” in the article below help you? - Workflow Workflow

(M. Engel) #3

I don’t really know. I have read it. I think perhaps AND( [_THISROW_BEFORE].[XXX] <> [_THISROW_AFTER].[XXX], ISNOTBLANK([_THISROW_AFTER].[XXX]) ) could do the trick but this is rather complicated. I had much rather have a timed delay, to be honest. Also, I tried filling this formula in in a Virtual Column, upon which - when verifying - I received a message saying the column had not been recognised.

(Aleksi Alkio) #4

In generally speaking… instead of using text value like “Send Email”, it’s better to use like NOW(). Then you don’t need to reset the value before you can trigger that email again. You can also use like TODAY() and then that email is possible to send only once in a day. If you set the value like TODAY()&USEREMAIL(), that one user can trigger only once in a day.

As you can see you have lot of different ways to control with the action.

(Suvrutt Gurjar) #5

Hi @Aleksi_Alkio, As usual your inputs are vital in making the solution much more compact.

(M. Engel) #6

I had a tryout today. First, the column I wanted received the content ‘WAAR’ (= TRUE) upon a user action. A workflow rule provided the mail I wanted to send. Then - after sync - a second workflow determined that the content of this column had been changed to TRUE and decided yet again to change this to ‘SENT’, thereby inhibiting any future email concerning that column, again, just as I wanted. So, this seems to work, but what I am curious to find out is if I missed sending any emails due to the syncing process going faster than anticipated. (having to synchronise multiple rows in a table) How could I find this out? If everything was sent, I would be happy enough with this solution.

(Suvrutt Gurjar) #7

@M_Engel, Thanks for your update.

Other community colleagues may be able to guide on delayed actions.

Just in case it helps, you may wish to go through and explore the following for approach mentioned in article referred. The

below description is based on the understanding that the app has first action (say action A)

that gets fired when the status of a column, say column A changes to say “Send Email”. The email should not be sent when another action B based on column B gets executed, on the same row, when the status of column A in unchanged.

The expressions containing [_THISROW_BEFORE] and [_THISROW_AFTER]

currently work only with workflow rules. As such, request you to enter this formula in Condition option of workflow pane of first action (action A) that needs to send an email.

The construct of the expression may be something like

AND( [Column A]=“Send Email”, [_THISROW_BEFORE].[Column A] <> [_THISROW_AFTER].[Column A] )

Hope the above helps in some way.