cancel
Showing results for 
Search instead for 
Did you mean: 

Comparing two collections

VladimirsCivcis
Level 2
Hello, I would really appreciate hints and tips about certain action. I have two collections that i want to compare for identical # , when i two collections have identical # store it in the new collection. What have i done is this - > I loop first collection followed by decision where i set to check two collection for # if they matched -> add row action ( i have already created 3rd collection for this case ) -> calculation stage where i write # to 3rd created collection -> delete first row from 1st collection -> delete first row from 2nd collection -> back to loop start. Now this is working fine until the point when i remove rows. I got error " no current row is set " and when i looked at collection it was showing 10 rows under the name of the collection. Instead of like 1 row of 10 (this is how it looks before deleting row) . When i click in one of the collection and go to the current tab and click ok, collection goes back to 1 row of 10. Is there an action how to set next row without going to the collection to fix it ? Or better yet, is there any more easier way to compare two collection and write matched # to 3rd collection without deleting rows at all ? Thank you for the time
2 REPLIES 2

SurajJadhav
Level 5
Hello buddy, I can't understand why you are deleting rows just copy the matched rows to the 3rd collection that's it you are done. You will get the matched rows from 2 collection in 3rd collection. you can improve your logic by this when you found the match write the matched row to output collection and break loop go to next row of collection. due to this you don't need to delete any row.

Hey, Yeah i was thinking yesterday about why i complicate stuff why do i even need to remove rows. I tend to over complicate simple stuff for no reason. I thank you for answering, your solution is actually what was really needed. Thank you