AnsweredAssumed Answered

list.asmx webserivce to get subfolder names with a foreach loop, overwrites the collection instead of appends to it...

Question asked by becmartin88 on Jul 16, 2014
Latest reply on Jul 17, 2014 by becmartin88

I have a document library with a bunch of folders
which have subfolders, which have subfolders... I'm using nintex workflow and
my workflow does this:

  1. gets the list of folders in the
    desitantion directory and passes this to a collection variable (areaFolders).
  2. For Each folder name in that
    • call the lists.asmx webservice to return the folder names within that folder (works fine), passes these to a collection variable(say, areaStoreFolders)
    • uses an
      XML query to process using xpath and store the result in the final collection
      variable (say, collectionStoreNames).

Here is where I run into the issue... each
iteration of the for each loop writes over the previous values for the final
collection variable (collectionStoreNames) instead of appending the most recent
values of the areaDepotFolders to the other ones already in
collectionStoreNames... How do I get it to stop doing this so I have a complete
list of store names...

(I know its doing this because I'm sending a print out of
collectionStoreNames to myself in an email).