Split a datatable based on variable from another data table?

datatable
activities

#1

Sorry for the new topic, but I felt that thanks to advice from @ovi my question has changed accordingly.

I currently have 2 data tables.

DT_1 is just 1 column and a list of unique names =

Fred
Zak
Mike

DT_2 contains many entrys per name =

Name day
Zak Monday
Zak Tuesday
Fred Monday
Fred Friday
Mike sunday
Mike Monday

What I am struggling to achieve, is I want to split DT_2 according to DT_1

So what I end up with is a DT_3 for each name.

my logic on how to achieve this is =

For each row in DT_1

For each row in DT_2

If DT_2 row = DT_1 row
then
Add row to DT_3
email DT_3
Clean DT_3
Continue

is my logic correct ? will this add each row for “Zak” to a single DT, email it, clean the DT , and then add each row for “Fred” and so on?

And if my logic is correct, then I have been struggling all evening on implementing it. Would anyone know the syntax for the “If” activity ?

Thank you for reading


#2

Hi,

Please refer this workflow.
Main.xaml (12.5 KB)


#3

Thank you so much @Bharat !


#4

Closing this topic since it has a working solution and example. If something related, please create a new topic and link this one. Thanks!