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

Question

Question

Clearing "extra" rows from Forms table when using "update business process variables" from Workflow

asked on July 28, 2021

Is there a good method of getting rid of extra rows in a Forms variable when the multi-value token that workflow is updating it with has fewer rows than the table currently has?

 

In case that's not clear:

A table in Forms has 5 rows. The forms process starts a workflow, the workflow moves some things around so that they should no longer show up in that table and ends up with only 3 values in a multi-value token. Then the workflow updates the table with that token. Rows 4 and 5 will remain unchanged, rather than being removed by the update. Instead, I want the data from the workflow to be the only data in the table.

 

 

0 0

Replies

replied on July 28, 2021 Show version history

You need to use two Set Business Process variable tasks.

 

On the first one, you select EVERY variable in the table, and set each value to null. (Missing a variable will cause it to keep the previous number of rows). This can be done by selecting the token selector, then under the special category you use DB.Null.

The second Set Business Process variables will be unchanged from how you currently have it.

1 0
replied on July 28, 2021

As far as I know, only one instance of "set business process variables" will work in a single workflow, which is why I didn't go with this method. I did try it just now, and it seems to not change how things work at all.

0 0
replied on June 4, 2024 Show version history

I have the same issue. I did try this approach and having 2 "set business process variables" does not seem to be an issue, however the table is still not cleared, and the old lines still appear in the form.

I also tried using DB.NULL to clear the table in one workflow, then use another one to populate it again. This does work to clear the data in the table but if the new table has less rows they will still be displayed but with an empty value - if I take the initial example, there will still be 5 rows displayed, however the last 2 will have no data.

Any suggestions to make this work properly please ?

Thank you

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

Sign in to reply to this post.