AnsweredAssumed Answered

How to break a collection variable or How to loop the for each limited times based on condition?

Question asked by janardhan on Jan 18, 2016
Latest reply on Feb 26, 2016 by janardhan

Hi Guys,


I have two collection variables and so I need to make two for each loops.


1st collection variable     :

     -     I am querying the list where I have empty field and save into collection variable.

Later I will make for each loop.


2nd collection variable     :

     -     I am getting bulk of data and storing in multi line text variable and extract the values we need and store into 2nd collection variable.

Now I need to update the item we are getting in 2nd collection variable to 1st collection item



Now Let us say

We have a list name Custom List and column name TripId, when the tripid is empty it will query the column and store into collection variable.

It makes 1st for each loop and later we get data into Multi Line Text and extract tripids from the data and need to update in Tripid column.


1st collection variable C = 4 Items(a;b;c;d)

2nd collection variable C1 = 10 items(1;2;3;4;5;6;7;8;9;10)


The item 1 should be assigned to a i.e;(a=1;b=2;c=3;d=4)

For this, I need to loop the 2nd collection variable only 4times. I don't need to loop the 2nd collection variable 10 times as this leads to performance issue. How can I make it?




Please check the workflow and let me know how can I update only required items getting in 2nd loop to 1st loop?

Else can we break the condition other than endworkflow(as we use "break;" in coding)?