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

Question

Question

Passing Table Values from One form to the Next in a Business Process.

asked on March 31, 2023 Show version history

We are trying to complete a business Process for Cities for a CODE Enforcement Application.

On our first Form we have a Simple Table With a couple of Columns and the ability to have Multiple Rows.

We would Like to Transfer the Variables from Each Row to the Next form in the Business Process with the understanding that we need all rows in the initial table to Populate a Table on Form 2 in the Process.

Here is an example of what was input on Form One,

Results on form 2 when passing Table Variables.

 

Note while both sets of values are there they are all in just 1 Row.

I need them to show up in individual Rows in the Table.

Please Advise!.

Hope this makes sense.

Here are the settings on the receiving Table on form 2:

Is this a Bug in Business Process or do you have an example of how to Pass Multi value Table Fields Correctly from One Form to another in the Business Process Preserving all All the rows.

0 0

Replies

replied on April 3, 2023

Hi Milton, if you have multiple forms in the same BP, and they share the same table variable, the values with just follow the variables to the new form. To copy values from one table to another, a couple things come into play. If you just want to just use LF formulas, then the second table needs to be of fixed length as the second table is unaware of the length of the first table.

You can use a formula in the second table such as =INDEX(FirstTablename.variablename,ROW()) to pull the values across

If you want the second table to be of variable length then you would need to use Workflow to pull the values from the first table, build a multi-value token to pass to the second table to dynamically populate the second table to match the first.

Also, there are a couple new features in the new Modern Form designer on Cloud that allow you to show or Hide parts of a form based on the User Task or Process Stage. I find this very helpful to not have to create so many forms in a process, as I can just create 1 form and turn off what I don;t want the user to see based on where they are in the process. 

Hope this helps

3 0
replied on April 4, 2023

Thanks Steve,

This did Work when the Receiving Table has Fixed Rows using the formula example you gave. So thanks for the suggestion.

I will try other approaches like Workflow as well but for now this seems like the simplest if you can live with a Fixed number of Rows.

1 0
replied on March 31, 2023 Show version history

If your goal is to have all values in a column of the table populate into another table, and have the same rows in that column, then I would recommend using Workflow to copy the values.  Workflow will pull the column from the table as a multi-value token, and you can push it into the column of the second table without needing to even modify that token.

0 0
replied on March 31, 2023

Sounds Like and interesting Idea Matthew. Have you actually done this yourself?

Thanks,

Milton

0 0
replied on March 31, 2023

Yeah, lots of times, both reorganizing values in a single form process, and passing values into a secondary process.

0 0
replied on March 31, 2023

OK that works for me. Just weird that the Multi Value Variable in Business Process does not pass from one Task to another. It would Save a whole lot of Work Passing stuff back and forth from Workflow. Thanks so much for the quick reply. Still would like to know if it can be done without Workflow.   Have a great weekend!

Milton

 

0 0
replied on March 31, 2023

Here's an example of what I mean in Workflow:

I have a notes table that I reuse on a lot of forms - so it's really consistent.  If I have a need to start a new process based on a prior one, I'll often copy the contents of the prior notes table and put them right into the notes table on the new process.  The "Retrieve Business Process Variables" can select the variables from the notes table on the first form (for example: notes_table.user, notes_table.date, and note_table.not) then the "Invoke Business Process" activity can load those values, unaltered, directly into the table on the new form, like this: 

notes_table.notes_user=%(RetrieveBusinessProcessVariables_notes_table\notes_user)
notes_table.notes_date=%(RetrieveBusinessProcessVariables_notes_table\notes_date)
notes_table.notes=%(RetrieveBusinessProcessVariables_notes_table\notes)

 

0 0
replied on March 31, 2023

What method are you currently using to pass the values into the second form?

Are you using formulas, or default values, or Javascript, or passing them as URL parameters, etc.?

0 0
replied on March 31, 2023

Just Passing the Table field Variable from each Column in the first table as the default Value for the Table Fields in the Table on the Second Form.

 

0 0
replied on March 31, 2023

As you can see from my example above.  The second forms Table gets that Values for each Column, it  Just places them in One row with a ; between each value.

 

0 0
replied on March 31, 2023

Yeah, that makes sense. 

There are definitely functions that they intended to have populate a table, like database lookups and passing multi-value tokens from Workflow.

But unfortunately, I don't think they ever intended for default values to work to populate a full table, so it just doesn't work that way.

0 0
replied on March 31, 2023

Fair Enough, would be a great feature though if it did! It's obviously needed and we are all trying work arounds to get there. Yours seems the logical approach.

 

0 0
replied on March 31, 2023

Another thing with the Workflow.  If you want wanting to just copy from one table in your instance to another table in the same instance, you can do that using the "Set Business Process Variables" activity instead of the "Invoke Business Process" process that I mentioned before.

Also, although it may not seem like it when setting up a workflow, because it seems to "link" to a specific Forms process.  If the variables are the same, you can reuse a workflow for different Forms processes.  So, if you always have table_a and table_b, and you always want to copy column_1, column_2, and column_3 from table_a into table_b - and all the fields in both tables have the same variables - and in every different process that uses those tables, the variables are always the same - then you should be able to just set-up a single Workflow that does the "Retrieve Business Process Variables" activity to pull in table_a, and then runs the "Set Business Process Variables" activity to push out the values into table_b.  It'll work from any Forms process you call it from that has those variables, regardless of whether or not you set-up the Workflow against that specific Forms process.  I hope that makes sense.

0 0
replied on March 31, 2023

I was Just about to ask that question. Thanks for anticipating. That's exactly what i need to do.

0 0
replied on March 31, 2023

You're welcome.  I hope this work or your needs.  smiley

0 0
replied on March 31, 2023

I think it makes sense, i will just have to try it and see. You have been a great help. Thanks for the quick reply!

 

1 0
replied on March 31, 2023

I only just now noticed your post was tagged as "Laserfiche Cloud".  I've been describing everything from an "on prem" perspective.  I think some of the terms used in LFCloud are different.  I don't know which ones in particular are different and which are the same.  Hopefully I'm not too far off the mark from how LFCloud handles things.  If things are way off between my instructions and your environment, then I'm really sorry.

0 0
replied on March 31, 2023

I hope someone from Laserfiche Responds with a definitive answer. Still will try your ideas.

Thanks again.

Milton

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

Sign in to reply to this post.