Video Screencast Help
Search Video Help Close Back
to help
New in the Rewards Catalog: Vouchers for "Symantec Technical Specialist" and "Symantec Certified Specialist" exams.

Variable Cleanup in a loop

Updated: 22 May 2010 | 2 comments
matzebru's picture
0 0 Votes
Login to vote
This issue has been solved. See solution.

I have two, integrated loops in one of my workflows (see image) that both contain a form to fill out. Each time through the loops, new data needs to be entered into the fields on the forms. The problem I have run into is when I loop through and then back to the form, it will pre-populate all the fields on the form with the data that has been entered on the prior pass though the loop. The only way I have found to solve this (so subsequent passes to the forms have no data from the prior pass) is to add a "RemoveDataComponent" (see image) for each field/variable downstream of the forms.

Does anyone have a suggestion on a better way of doing this? I'm sure it's probably something simple I'm missing. Thanks!

imagebrowser image

discussion Filed Under:

Comments

Rob Moore's picture
29
Jul
2009
0 Votes 0
Login to vote

I can see 2 ways to do this...

The first is to use a single component called Initialize Data. This allows you to define multiple variables and set an emtpy value for all of them.

The other method, which is probably better in the long run, is to create a complex Variable type that has all the fields you need. With the complex type, you have a single varialbe, with multiple elements. When you want to clean out the variables, you just have to use one Remove Data component.

rob

matzebru's picture
29
Jul
2009
0 Votes 0
Login to vote

Nice!

Thanks Rob! Sometimes I get too busy putting stuff together and my eyes glaze over the obvious stuff in Workflow :) I can see both of those solutions working nicely!

- Bruce

 *** If a forum post solves your problem, please flag it as a solution. If you like an article or forum post, vote it up. ***