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

Question

Question

Set Business Process Variables from table to table

asked on March 3, 2016

Good afternoon,

We have a form that has a table (dynamic size, not fixed),  When submitted, a workflow is run and at the end of the workflow we have a Set Business Process Variables.  We have some of the values being passed from the table into another table on the next form.  However, this does not seem to work when there are more than one row in the table.  So our Form on submit looks like this:

The workflow starts and the last step starts the verification form and that comes up as:

We don't have that second table line.  Is there anyway to do this? 

Thanks,

Chris

0 0

Answer

SELECTED ANSWER
replied on March 3, 2016

Set Business Process Variables only sends data to Forms once when the workflow instance completes. So having more than one is not going to do anything for you.

Each column in the table in the first form produces a multi-value token. If you assign that to the column in the second tables, all rows will be transferred.

0 0

Replies

replied on March 3, 2016

You need to use a workflow activity FOR EACH ROW on the initial submitted table.

0 0
replied on March 3, 2016 Show version history

Tried that and it does not seem to work.  We used to have just one Set Business Process Variables.  I tried to add one in a For Each Row and set it to the retrieve line items.  I took the line item stuff out of the first Set Business and put it in the for each row.  Still no luck.

0 0
replied on March 3, 2016

Also we did try a few other things.  It seems that you can only use one Set Business Process Variables as the above overwrote the below.  So we changed it to one activity.

So the one value fields are not being interated but the table lines are.  We have tried it a few different ways but nothing seems to do it.  With this setup though it does seem to pull over the last table row.  So if I do two rows in the table it pulls over the info from the second row not the first.

Thanks

0 0
SELECTED ANSWER
replied on March 3, 2016

Set Business Process Variables only sends data to Forms once when the workflow instance completes. So having more than one is not going to do anything for you.

Each column in the table in the first form produces a multi-value token. If you assign that to the column in the second tables, all rows will be transferred.

0 0
replied on March 4, 2016

Thank you very much for the reply Miruna.  I think we have it setup right but it still only transfers one.  We created a multivalue token for each of the columns.

Then in the set variables we have

So it seems we are setting the next form table with the multivalue tokens.  Is this correct?  I am sure I am missing something as it still seems to just pull over one row.

0 0
replied on March 4, 2016

Why are you creating tokens to hold unmodified token values? Does it work if you use the token from Retrieve BP Values directly?

0 0
replied on March 4, 2016

Well, nevermind.  But you are correct, the very first thing we tried was just straight up Retrieve BP Values and it didn't work.  So we thought we would try the multivalue tokens just to see.

Turns out the user create the table that these were being passed to as a fixed number of rows and I didn't notice.  The fields were read-only so they could not change it (verification).  Didn't think to check that.  Changed the table accepting the values to be variable number and then it worked normally.  Side note - It seemed to work with the tokens as well as the normal Retrieve BP Values.  So it does work out of the box as expected, they just had the table things were transferring to was set to fixed rows.

Thanks!

0 0
replied on March 4, 2016

Yeah, I didn't think a multi-value token wouldn't work, just wanted to rule out simple mistakes like forgetting to set the tokens as multi-value (since i couldn't tell from the screenshot if they were multi-value or not).

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

Sign in to reply to this post.