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

Question

Question

Mutiple values token and set business process variables

asked on June 9, 2020

Hello,

How can I assign multiple-values token to set-business-process-variables, so that all the values in the multiple-values token are transferred in the set-business-process-variables and then set-business-process- variables can transfer all the values to a form.

I have a query that returns more than one row. I am using for-each-row loop and assign values to multiple- values-token and then after the loop I assign the multiple-values token to set-business-process-variables. But multiple-values token only assigns the last row that was fetched from the query to set-business-process-variables.

Thank you.

Multiple values token.PNG
0 0

Replies

replied on June 9, 2020

What Forms variable are you setting? Multiple values should only work with a collection's field or a table's column.

Additionally, I assume from that disabled Email 4 that you have confirmed that it is correctly appending the row's value to the token, but if not, you should verify that.

Another thing to consider is that you could set the Forms variable as all of the token's values separated by a semicolon or something similar (with %(Token#[; ]#)  ) and then separating the values on the form with JavaScript.

1 0
replied on June 9, 2020

Thanks for the reply.

I am using table's columns as Forms variables. So shouldn't set-business-process-variables append all the rows in the table?

You are right, in Email 4 row's values are being appended correctly to the token.

I also have an Email activity after the set-business-process-variables in the last. Is there a way to check if set-business-process-variables has all the rows values in an email?

Thanks.

 

 

 

0 0
replied on June 9, 2020 Show version history

Yeah you should be able to check them with %(Token#[; ]#).

If you didn't use the append then it would make sense why only the last was showing.

That said, you might not be able to set the table variables with multiple rows from Workflow. I have not tried it myself.

1 0
replied on June 9, 2020

Thank you

0 0
replied on June 10, 2020

I don't see where you're creating the token you append to. That should be done before you go into the For Each loop, otherwise you're re-creating it with just the current value every time.

The Simple Synchronization Sequence is unnecessary.

1 0
replied on June 10, 2020

I am appending rows in "Assign Token Values 2" within for each row loop. For now I have just dropped this idea of getting list of rows.

 

Thanks.

0 0
replied on June 9, 2020

Thank you very much.

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

Sign in to reply to this post.