AnsweredAssumed Answered

Should I create a collection for each field

Question asked by davidjohnson5000 on Feb 24, 2017
Latest reply on Feb 26, 2017 by jesse.mchargue

A while ago I found a looping example on this site (can no longer find it) that had me create a collection for each field.  The collections were then stored in a variable (such as text or integer, etc.) via a Collection Operation.  Once the Collection Operation is complete I did a build string along with other processes using the various variables.

 

Last week Cassy Freeman opened my eyes to using only 1 collection variable.  See   Site Workflow - Document Review Date Approaching Reminders

 

Per Cassy:

  1. Your collection variable will have none or more IDs in it.
  2. You then do a for each ID in the collection variable
  3. Inside your for each, you take the current ID in the loop and re-query the list where ID = current ID and pull back the information you need (i.e. assigned to, task name etc) into variables

 

Thus, my question is when do you set a collection for each field vs. using the Cassy method (set a collection for 1 field - the ID and then create a query that joins the ID from the For Each against all the ID's pulled from the query filter.  It seems like the non-Cassy Method creates a lot of overhead ?

Outcomes