@Suzana_Joby Can you tell us what should be your Output ? We can go with the For Each but if you would tell us the End Result that you need, then we might be able to give you the best solution possible.
In this case, I want to do some processing and move onto next name
it doesn’t find name in List 2
Let’s say for Sarah, the bot will go through EVERY mail in List 2, if it doesn’t find the name in any emails, then I’ll do some processing and move onto next name
@Suzana_Joby, you can also use two for each activity, the outter for each will iterate through names, and the inner for each will iterate through emails. how this works is:
The outter loop will go once and then the inner loop will go until the finish, and then the outterloop will go for the second time the inner loop again goes till the end. so in your case the outter loop will take Sarah and will compare with all three emails carried by the inner loop and so on. This might be confusing but i think for what you want to do, it will be the best. inside the inner loop you will need an if activity checking if the name is contained on an email.
I also made an example for you, have a look and let me know what you think about it. Main.xaml (8.2 KB)