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

Question

Question

Workflow to fill fields in on a form already in progress

asked on October 26, 2022 Show version history

Can Workflow fill fields on a form already in progress?  I have done Set BP Variables for when starting a new form, but...

CASE OPPORTUNITY:  Have workflow look at the shortcuts in a folder in a Laserfiche repository and then send the names of those shortcuts into an In-Progress form table, filling a row for each shortcut name.

I want to do this for a Records Ready for Destruction approval process that would include a Destruction Certificate as one of the tabs on the active form.

 

0 0

Answer

SELECTED ANSWER
replied on October 28, 2022

You mentioned that your Workflow version is 10.x and Forms is version 11, so it could be a compatibility issue.

Try using the workflow to update a basic Single Line field with any value. If that still doesn't work, then you may need to open a support case.

0 0

Replies

replied on October 26, 2022

Yes but the workflow needs to know which instance and when to do this. This is done by calling the workflow from the forms process when your ready for it, now workflow knows which instance is asking for the data and that it is ready for the data to be populated.

Just use the Set BP Variables activity in your workflow, when it is called it will set the variables for the instance that called it.

The activity in the process diagram that calls workflows is the one with the gear logo.

2 0
replied on October 27, 2022

You can also retrieve the submission and instance ids from a document your form saved to the repository (provided you saved the ids in the metadata), then use the ids to retrieve or set the business process variables.

1 0
replied on October 27, 2022

Thanks for your responses!  So, I've built the workflow and run it.  I can confirm that the workflow collected all the names and locations into tokens as needed, but the table in the form did not get filled.

0 0
replied on October 27, 2022 Show version history

Is this workflow being triggered by the Forms instance? You can only set the variables on an active instance when the workflow is triggered by that instance.

Also, is "Started by Laserfiche Forms" checked in the workflow properties? This makes sure all the Forms-related tokens are tracked and available.

If you're on a recent enough version of Forms, the instance history/details will allow you to click the workflow activity to see the values it posted back.

0 0
replied on October 27, 2022

You might just need to check the box to Wait for the workflow to finish. Without this it will only start the workflow, not wait for a response back.

1 0
replied on October 28, 2022

Yes to all questions:  It was set to Wait, it is a Workflow activity in Forms that kicks off the workflow.  I do have, in the workflow, the "Started by a LF Form" clicked on.  I am on Forms 11 but using the Classic Design and I believe Workflow is still the latest 10 version.

0 0
replied on October 28, 2022

It looks like the problem is probably with trying to insert a multi-value token into a table. I'm not sure how you could insert line by line into your table from a multi-value token within the Set Business Process Variables activity.  

0 0
replied on October 28, 2022

Do I need to configure Input and Output Parameters for the workflow?  I've never done that before, but then I've never successfully updated a form from workflow before either.  wink

0 0
replied on October 28, 2022

Craig,

A multi-value token is the correct way to update a table. Workflow can only run Set Business Process Variables once; if it is added to a workflow multiple times, like in a loop, only the latest value would actually be sent to Forms.

Connie,

Open up the instance data for one of the tests you ran and take a look at your Workflow activity. You don't need to set up input/output parameters, but from the instance data you can click on the workflow activity to see what values it sent, if any.

0 0
replied on October 28, 2022

Jason, thanks for setting me straight.  I wasn't sure if that's where Connie's problem was or not.

0 0
replied on October 28, 2022 Show version history

Jason, re instance data... when I look at my workflow, I can see that it did fill the tokens correctly.  I'm not sure what else to look at.  There are no error messages.  When I look at the Activities tab on the workflow that ran, I see the Set BP Variables as the last task of the wf.  It says completed, but it took 0ms so... kinda confirms it didn't actually do anything, but... why... ?

There is nothing under the Entries tab, and nothing under the Business Process tab.  Should there be?  Oh, under Parameters, it does show the BPinstance as 36779 and the submission id as 78191, which I can confirm was the one that was submitted just before the workflow was to kick in.  Oh, and the workflow line on the form history is submission id 78192.  

0 0
replied on October 28, 2022

Hi Connie,

When I mention the instance history, I'm not referring to the Workflow, I'm referring to Forms.

In Forms, when you go into Monitoring and open the instance, the workflow activity will be clickable and show the data that was passed in.

0 0
replied on October 28, 2022

0 0
replied on October 28, 2022

Does the table you're trying to update exist on the Supervisor Review form, or is it only included on a subsequent form?

0 0
replied on October 28, 2022

In this case, yes it does because I haven't split the form up into stages yet.  I like to wait until the whole process is working perfectly before splitting it up into stages so I can control who sees what at their own reviews.  So, yes.  One form.

0 0
SELECTED ANSWER
replied on October 28, 2022

You mentioned that your Workflow version is 10.x and Forms is version 11, so it could be a compatibility issue.

Try using the workflow to update a basic Single Line field with any value. If that still doesn't work, then you may need to open a support case.

0 0
replied on October 28, 2022

Make sure in the Forms table field configuration that you have the radio option selected to append rows by a lookup or variable.

1 0
replied on October 28, 2022

That radio option shouldn't be required. I have an active Forms business process that populates tables/collections via workflow and not all of them have that option enabled.

0 0
replied on October 28, 2022

Oh interesting, I guess that makes sense since all fields are just the value of their variable no matter the setting anyways, but it does specify that so I always used it when setting the values with workflow.

There shouldn't be any other reason why the monitor info would show the variable is populated but yet the user does not see it populated besides local script/calculation or overlooking that they are using the wrong variable on the form.

0 0
replied on October 28, 2022

Okay, so Chad I did not have the checkmark in the spot you mentioned.  Thought that might be the key, but no, it did not resolve the problem.  It just made the fields disappear.  The column headers are there, but the fields are hidden.

So now I have copied the process and built another wf so I can test what Jason suggested with a Single Line Field.  It works!  The wf DID post to the single line field.  Maybe I should try rebuilding my other workflow?  There was one time where a wf activity wasn't working until I rebuilt it.  I try that and report back.

 

0 0
replied on October 28, 2022

AHA!  Success! 

Rebuilding the workflow into the one that worked for the Single Line Field worked!

I have my destruction certificate filled in beautifully by Workflow!

Thanks guys for all your help!

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

Sign in to reply to this post.