Author Message
RajeshBairagoni
Joined: Dec 16, 2013
Messages: 98
Offline
Hi,

As mentioned in used guide LoopCollection used to iterate over collection. But I am facing issue while using it.

I have created one simple variable using project variable and assigning one arraylist object to that variable which has some values.

I am not able top iterate when I use that variable in LoopCollection destination variable.

Could you please let me know how can I achieve above scenario ?

And also how to make use of LoopCollection. If any example, it would be helpful.
NeilGoldsmith
Joined: Nov 6, 2013
Messages: 902
Offline
You might need to reset the collection back to the beginning before using it.

Try this:

reset collection
trace current value
while collection hasMore()
next in collection
trace value
RajeshBairagoni
Joined: Dec 16, 2013
Messages: 98
Offline
Could you please send sample to rajesh.bairagoni@gmail.com ?
NeilGoldsmith
Joined: Nov 6, 2013
Messages: 902
Offline
We have sample apps that are part of OD that contain collections. One in particular called ArrayExample has a lot of collection manipulation that can help you understand them.
RajeshBairagoni
Joined: Dec 16, 2013
Messages: 98
Offline
I have went thorough ArrayExample. But my requirement is to store collection of strings in a variable (as a list) and iterate over it.

When try to do as like in ArrayExample, for each iteration instead of actual string am getting an integer value.

Could you please help me how to get actual string vaule?
NeilGoldsmith
Joined: Nov 6, 2013
Messages: 902
Offline
I would need to see what you are doing. Are you doing this in java code or in the Data node? In either case, attach either a screen shot or the source. If a screen shot, I need to see what the properties are for the items you are using.
Go to:   
Mobile view