Loop on two collections with various row count ISSUE

AndrzejF

New Member
Hello :)

I have a process that I need to finish and where I have to loop through two collections. [Coll1] has data from data base that I try to find match/similarity to [Coll2] - input from customers. Then when finds match it can continue to chew and compare more rows between those.

I take first row from [Coll1] and loop from the top to the bottom of [Coll2] to find match for that row from [Coll1] on [Coll2]. I am using Count ++ on [Coll2] each time it read row.
For the moment I have [Coll1] with 20 rows looping through [Coll2]with 7 rows.
But the idea is to get the loop work no matter how many rows there are on each of these.
How can I get the count for main collection work? So I can loop through collections no matter the row count.

Or should I check the collections some other way?
 
Last edited:

sahil_raina_91

Active Member
Hello :)

I have a process that I need to finish and where I have to loop through two collections. [Coll1] has data from data base that I try to find match/similarity to [Coll2] - input from customers. Then when finds match it can continue to chew and compare more rows between those.

I take first row from [Coll1] and loop from the top to the bottom of [Coll2] to find match for that row from [Coll1] on [Coll2]. I am using Count ++ on [Coll2] each time it read row.
For the moment I have [Coll1] with 20 rows looping through [Coll2]with 7 rows.
But the idea is to get the loop work no matter how many rows there are on each of these.
How can I get the count for main collection work? So I can loop through collections no matter the row count.

Or should I check the collections some other way?

From what I understood, you want to compare 2 dynamic collections at run-time. If that is all you require, there is no need to store row count using count ++.
Something like below should solve your issue, or are you looking for something else?
1601923851434.png
 

AndrzejF

New Member
Hello!
This worked. Thank you for helping! This is already 100 % better than I was before ( btw I needed count to make copies of current row. But not to loop in this main loop here)
I think that I need to consider "Delete Row" so that the rows that are left after loop can be used further.
Let me clarify:
All that is match in that stage we go through now is going to me compared further. Rows that are not matching are either going to
Collection no match database or Collection no match customer input.
I am a bit lost here allow me to double check that by asking again :)
 
Top