Page 1 of 1

Delay redirect to wait for workflow

Posted: 23 Jun 2016
by Stu
Hi Guys

I have a case where I create an Item I need to generate a "Number" for the form. I get this number by a workflow when the new form is saved. It initiates the workflow to add the number. I redirect to the edit form and display the number the workflow added. It works 80% of the time.

The other 20% the Edit item from loads before the workflow has assigned the number.

Can I make the redirect delay a few second until the workflow has finished?

Re: Delay redirect to wait for workflow

Posted: 24 Jun 2016
by Dmitry Kozlov
Hi Stu,

I recommend you to populate the Number via JavaScript directly in the New form.

Re: Delay redirect to wait for workflow

Posted: 24 Jun 2016
by Stu
Hi Dmitry

I have considered that but unfortunately I can only get the number after the form has been saved else I will be losing numbers to unsaved forms and the number needs to be incremented each time I take one.

Is there a method to delay the redirect?

In this case I have removed the redirect and force the users to reopen the edit form. But it would be useful to be able to delay the redirect to allow processing to complete.

thanks

Stu

Re: Delay redirect to wait for workflow

Posted: 27 Jun 2016
by Dmitry Kozlov
No, you cannot delay the redirection, but you can, say, calculate the Number via JavaScript in the Edit form and display it before populating the field via the workflow.

Re: Delay redirect to wait for workflow

Posted: 14 Feb 2018
by mustangdjb
If anyone ever does figure out a delay, that would be useful to us as well. Thank you

Re: Delay redirect to wait for workflow

Posted: 15 Feb 2018
by Nikita Kurguzov
Dear mustangdjb,
Unfortunately, there is no way to delay redirection after submission. In all situations, we recommend to supplement Workflow with JavaScript, it allows you to do pretty much a Workflow would do, but without the need to wait.