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

Question

Question

Updating a variable within a user task

asked on December 6, 2019

Hello,

We have a customer who has a Forms process that involves a user task where a form is approved before the process ends. This form has a table in it, and the customer would like a drop-down within the table changed to a single line. The value from the drop-down is placed into the task name in the user's Forms inbox. Is there a good way to effectively "transfer" a variable value from one variable to another without proceeding to the next task in the process modeler?

What happens is if I change the drop-down to a single line, the value from the drop-down remains in the task name, as expected, since the variable still exists. My plan was to have the customer use the value in the task name to go through each task and update the single line before saving the draft, and then I would change the task name to use the new variable that corresponds to the single line. However, that new variable doesn't get stored without proceeding to the next task, which in this case is just submitting the form to the repository. So, I'm struggling to find a way to update task names for existing in-progress forms while also accommodating new submissions.

I'm sure that's confusing so please feel free to ask me to clarify any part of this. Thanks!

0 0

Answer

SELECTED ANSWER
replied on December 6, 2019 Show version history

There's not really an "official" way to update a variable without completing a task. However, there are some options you could pursue.

First, you could JavaScript to automatically transfer the value on the in-progress forms. Calculations and workflow are other options, but they may cause an undesirable impact on new submissions or present additional challenges.

You could add JavaScript to the form that checks if the "old" drop down field is populated when the page loads, and if it is, copies the value over to the new single line. For this you would need to leave the old variable on the form, but you can use Field Rules to hide it (set to Save the value so it isn't lost).

This approach would allow new submissions to just use the new field while allowing the "in-progress" forms to be updated without forcing everyone to manually transfer the data.

The values won't be saved until the form is submitted, so if you want that to happen, what you could do is add another button to the task form called "Update" or something like that.

In the Business Process modeler, add a gateway after the task, if the user selected the "Update" button, have it just loop back to the task; this will cause it to save the variable value without actually moving onto the next step.

Once you've gotten everything updated, you could then remove the extra button, the gateway, and the JavaScript and point everything at the new single line variable.

1 0
replied on December 6, 2019

Thanks, Jason! Adding a gateway that loops back to the same user task worked perfectly.

0 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.