Home > Forum > Forms > Redirect to another workflow and back

Redirect to another workflow and back
0

Hi all!

We have a tricky problem, so it seems.

We want to redirect to edit form of another workflow (ID is known). This should be triggered with button click on current form.

Button is implemented as Html field and invokes a global menu action which has the correct hyperlink action and also returnUrl to current element.

After save of the other workflow element, user should be redirected to current form element.

Before redirect to the other workflow, current item should be saved.

Unfortunately we cannot figure out, how to achieve that.

Any help is appreciated!

MVP

Hi Nikolaus,

I think I would do this by passing the link/id of the current element via the hyperlink action to some technical field and then on the save path redirect back to the first element using the saved id in that field, or am I missing something?

By passing the id through a link, I mean using something like this:
https:/bps/db/1/app/51/element/26639/form?AttInt1=1234
AttInt1 is a name of the field in database

MVP
In reply to: Sebastian Gębuś

Hi Nikolaus,

I think I would do this by passing the link/id of the current element via the hyperlink action to some technical field and then on the save path redirect back to the first element using the saved id in that field, or am I missing something?

By passing the id through a link, I mean using something like this:
https:/bps/db/1/app/51/element/26639/form?AttInt1=1234
AttInt1 is a name of the field in database

Hi,

there's also an option without storing the value in a technical field:
If you don't mind using undocumented features, you could try to use the {R:} variable to access an URL parameter

https://alterpaths.com/usage-of-url-parameters-in-webcon-bps/


Alternatively you could use the previously mentioned SDK action to access it.

A completely different approach would be to open the other workflow in a popup which will be closed once the element is saved.

https://daniels-notes.de/posts/2022/add-new-choice-field-value-without-leaving-the-page

Best regards,
Daniel

MVP

We actually did exactly what you did and for our case it works. We are also calling the menu action from a button on a html field, which starts a new workflow and after finishing the steps (we even use wizard mode), we end up back on the form the action started.

On the hyperlink action there is a checkbox "Automatic save".
When checked the current form is saved, so the user does not loose data unintentionally.

In reply to: Markus Jenni

We actually did exactly what you did and for our case it works. We are also calling the menu action from a button on a html field, which starts a new workflow and after finishing the steps (we even use wizard mode), we end up back on the form the action started.

On the hyperlink action there is a checkbox "Automatic save".
When checked the current form is saved, so the user does not loose data unintentionally.

Hi all!

Many thanks for these hints, they are very useful.

I also wasn't aware of URL parameters, maybe I should read the documentation more carefully ;-)

I personally like the undocumented {R:}, which gives more flexibilty and readabilty.

My first approach was a global action and InvokeMenuAction in HTML field with button, but unfortunately
checkbox 'Automatic save' is greyed out in this case, so we had to take a path for this.

Is there any reason for this?

We are using 2022.1.1.53.

Many thanks again!!!