How can I add string values in list collection

Hello,

Here is my scenario.
I have separate method running were generates different string values. Whenever it creates url that is String Value it outs to main method. I want to create list of all string values.
In Add Collection activity in “Item” field I just mention as “out_StringValue” it gets overwrite each time it calls method. Anyway I can resolve without using any extra array or list to store these values.

@adhishc, mind sharing the workflow?

image

1 Like

@adhishc, it’s very difficult to help you based on assumption, by looking at this image i can’t really tell what is the problem, but I wrote this simple workflow for you to examine and possibly see where you might be going wrong,

Here I am simply just reading an excel file and then taking each record and adding the collection and then printing each item from the collection.

Main.zip (7.6 KB)

1 Like

@adhishc if you have initialized your collection variable by assigning to New Collection(Of String) make sure your assign activity is outside the loop.

Thanks this resolved the issue. I was declaring list in loop.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.