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

Question

Question

Lookups on a form are not triggered when workflow starts

asked on December 20, 2022

Found that lookups configured on a form no longer apply if workflow submits the form. Was this intended? Seems if workflow is starting a form, the lookups must be re-done in the workflow as well instead of relying on the already configured lookups.

After it was reported, I tested with a simple test process using 2 fields and one being a lookup based on the other.

0 0

Answer

SELECTED ANSWER
replied on December 20, 2022 Show version history

From my experience, if workflow starts a form and pushes data into the form, the form doesn't recognize that the fields have changed as they were present when the form launched, and as such does not trigger the lookup. In those cases where I need the Form to run the lookup to update the lookups whenever the form task is opened, then I have a couple lines of JS I add to the form that will trigger the lookup I want to run on form open using the values in the form fields

2 0
replied on December 21, 2022

Got it, that is much more tricky than I expected. I would prefer to treat workflow like any other user submitting the form, so that there are no rules or JavaScript to maintain in addition to the existing lookups.

0 0
replied on December 22, 2022

Just as a clarifcation, if the Fields were initially blank when Workflow filled them, then the rule should run the first time the form is open, but if you change the value with WF then it may not, and they don't run again when moved from task to task unless you retrigger the Lookup with JS

0 0
replied on December 22, 2022

The problem is that the lookup is to determine who the first task should go to, so no one is there to open a form since we are trying to determine who should open be assigned.

0 0

Replies

replied on December 20, 2022

Do you mean the lookups aren't running in the subsequent user task, or were you hoping to have the lookups running in the background for the workflow submission?

0 0
replied on December 20, 2022

I was just expecting the lookups to run and fill the variable named Assignment_Username, since the form that is submitted by workflow has a lookup to populate that field.

Now what I have is a lookup on the form and a rule call in the workflow, which means the development is duplicated and if an adjustment needs to be made it has to be done in 2 disjointed places.

0 0
replied on December 20, 2022

I could be wrong, but it looks like Workflow is actually populating a blank value into the Assignment_Username field.  So Forms isn't populating it via the load lookup, because it's recognizing that it has been populated (albeit, populated as a blank value).

What if you modify the Workflow to not touch that field at all, don't include it in the selected fields on the activity, and definitely don't include it in the variable population of the activity.  In that case, Workflow isn't touching the field, so Forms should still reflect that is it an incomplete field and attempt the lookup.

0 0
replied on December 20, 2022

It was not touching the field at all, I did not even have it setup as an input variables so it would be impossible to access it.

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

Sign in to reply to this post.