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

Question

Question

Populating Form Table from Workflow

asked on June 19

Hi Everyone,

I have created a Form table for which rows gets updated from workflow. It seems to work fine initially when it was about one row, but failed to update more then one row while i used "Set Business Process Variables" with "For Each Row".

Table was set to append rows to the rows populated by data source or variable. Please help me with appending multiple rows in a form table by workflow. Thanks

0 0

Answer

SELECTED ANSWER
replied on June 19

Set Business Process variables only sets the data once when the workflow instance is complete. Use multi-value tokens to set each column in the table at once.

0 0
replied on June 19 Show version history

Hi Miruna

I assigned multi value for each column in SQL Table but but I couldn't insert all the rows.   It only inserts last row into the Forms table.   I even put the the "Set Business process Variables" out side "For each Row" loop and the result is the same.  

In the following image what am I doing wrong:

0 0
replied on June 19

Hi Farzali,

I think the "Set Business Proces Variables" activity is outside the scope of the "For each row" activity, so it only inserts the last record.

The "For each row" activity is out ....

Move "Set Business Proces Variables" activity into "For each row"activity

regards,

Marco.

0 1
replied on June 19

Hello Marco

I had tried that already and tried again but the result is the same.  I am only getting the last row.

 

0 0
replied on June 19

Hi Farzali,

 

Try removing the "Asign token..." activity, and assign the values ​​directly.

0 0
replied on June 19

Can you show the definition of you form fields as well as the properties of the Set Business Process Variables activity? They don't look like table fields.

0 0
replied on June 19

here are the detail requested

 

 

0 0
replied on June 19

Oh, sorry, I should've seen it straight away. You're creating the multi-value token inside For Each Row. So it's re-created at every iteration with only one value, the current one.

Create the ReqID, VendorName and other tokens before you go into For Each as blank multi-value tokens. Then inside For Each Row, modify them to append the values.

(You can copy the Assign Tokens activity and paste  it up, then remove the For Each tokens from the values. Then for the one inside For Each Row, you can right-click on each token and choose "Change Action to 'Modify'" from the context menu so you don't have to reconfigure it from scratch).

1 0
replied on June 19

Thanks Miruna, it worked.  Appreciate the hlep.

0 0
replied on June 20

Hello Miruna

 

I just noticed row number one gets duplicated, how can I get around this? 

0 0
replied on June 20 Show version history

Hello Again

 

I got the issue fixed.     I put a conditional Sequence after For Each Row to eliminate first Iteration   (does not equal 1), this fixed that duplication on first row.

 

Thanks again

0 0

Replies

You are not allowed to reply in this post.
replied on June 19

Marco, I have already done direct assigning form the "for each row" activity and the result is only the first row gets inserted.   Now I am implementing Miruna's suggestion:

"Set Business Process variables only sets the data once when the workflow instance is complete. Use multi-value tokens to set each column in the table at once. "

replied on June 19

Marco, I have already done direct assignment from For Each Row activity, I only got first row inserted.   Now I am trying to implement Miruna's suggestion:

Set Business Process variables only sets the data once when the workflow instance is complete. Use multi-value tokens to set each column in the table at once.

replied on June 19

Thank Miruna it worked. 

 

 

You are not allowed to follow up in this post.

Sign in to reply to this post.