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

Question

Question

Clear a Collection using Set Business Process Variables

asked on October 12, 2016

Trying to clear a collection using a workflow.

 

We have a form with generic fields up top and then a collection for vendor information.  They can add multiple vendors which is why its in a collection.

At the end of the form, the user checks a radial asking if they want to add another item.  If no, then we move on to the next form.  If yes, we want to loop them back to the same form but with the information cleared.

So we have a simply workflow inbetween the passback that grabs all the variables and clears them.  I can use a Set Business Process variables and set the variable equal to nothing, so for example:

personname=

This clears the item.  However I cannot use more that one Set Business Process Variables nor does it seem I can put it in a For Each Row since I cannot iterate the variables.  Any ideas on how to clear all form variables inside a collection if the user gets the form back?

 

Thanks

0 0

Replies

replied on October 12, 2016

Hey Chris,

Try using the special %(DB.NULL) token. More information in this answers post https://answers.laserfiche.com/questions/100278/Set-Business-Process-Variables-to-set-table-values-to-null-in-a-form

0 0
replied on October 12, 2016

Thanks Kevin, the null seems to clear.  However on non nulls it does not seem to get the all the fields to No either.  For example, here is a screenshot of what I got back to the Form.

 

Notice the New SWIFT Vendor dropdown is No in the first collection, but Yes in the second collection.  Here is my Set

I have it setting that field to No but it is not applying to all collections.

0 0
replied on October 13, 2016

If you want to assign values not remove the values, you should use set business process variable within for each row activity to set values for all the sets.

0 0
replied on October 13, 2016

Hey Chris,

You don't want to put the update activity into the for each row. Instead, you'll want to create a multi-valued token, and update it inside the for each row activity. Then set the dropdown to that multivalued field. You should have as many 'No's as collections.

0 0
replied on October 13, 2016 Show version history

Ok, seems like there are some contradictions.  I have tried the For Each but it doesn't work.  Xiuhong, you are saying to do this?

Kevin you are saying to try this?

with

 

 

 

0 0
replied on October 13, 2016

Yes the 2nd approach. The first approach will try and interact with the forms process multiple times - but only one will go through. 

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

Sign in to reply to this post.