Hello ! I have a question please, I thought the comparison microflow was working unti I tried it with 2 smaller files that have just three lines each.the first two lines of the two files have different categories, so, they must be added to file3 which is the case, te second two lines have the same categories and they musy be ignored and that's the case, but when it comes to the third lines in both files, that have two different categories and so it must be added to file3, it is not added.so the error comes from false in the microflow (after decision : Categorie Different?).Also, I tried to test with bigger files and noticed that somelines from both files are mixed, and I guess that's happening because I used a nested loop that for each line of file1 compares it with all the lines of file2 and that's the problem.So, I tried using a single loop but it's illogical since in this case i have only one interator for one of the files 1 or 2, whereas i want to iterate through both lines of file1 and file2 but (for each similar lines : line1 from file1 with line1 from file2 and then line2 from file1 and line2 fron file2 and so on).Could you please give me any suggestions to fix this error ?
If you iterate over filelist1 and use the iterator to perfrom a filter action you can find all the files in list2 with the same category. Substract that list from filelist2 and you are left with a second list with only different categories from those in filelist1. Now you only have to add the files from list1 and list2 to list3.
So you need just 1 loop and some list operations.
Erwin 't Hoen
You can efficiently handle this scenario with just one loop and some list operations. Here's the approach:
Iterate over filelist1.
Within the loop, use the iterator to perform a filter action on filelist2 to find all the files with the same category.
Subtract this filtered list from filelist2. You're now left with a second list containing files with different categories from those in filelist1.
Finally, add the files from both filelist1 and the remaining files in filelist2 to filelist3.
This approach allows you to achieve the desired outcome while simplifying the logic by eliminating the need for nested loops and ensuring efficient handling of the files.