cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mrleetyler
Resolver I
Resolver I

email group of people based on filter on another column

hi all,

 

Scenario:

I have a SP list with "Title" column being a "Mission Reference" i need to send an email to all users where the "mission reference" is the same. 

 

I have managed to get the unique "Mission Reference" by doing a Select / Union (Compose) and that's fine i now have a list of the unique "mission reference" to use.

 

however i'm just a bit stuck on how to proceed from here. i assume i would need to make an array based on email addresses vs Mission Reference but i'm struggling to make that work.  

 

i can't do a "Get items" to filter down the data as there are many mission references in the list so i need this to:

 

Loop through Each Unique Mission Reference and create an Array of email addresses associated to that Mission Reference

 

any pointers would be great.

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @mrleetyler ,

 

My bad, I have attached the detailed expression below:

vjefferni_1-1626747074378.png

vjefferni_3-1626747292925.png

 

Filter Query:

Title eq '@{items('Apply_to_each')['Mission Ref']}'

 

Expression:

items('Apply_to_each')['Mission Ref']

 

Hope this helps.

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

7 REPLIES 7
v-jefferni
Community Support
Community Support

Hi @mrleetyler ,

 

Could you please share a bit more of your detailed scenario? How many lists will be using in the scenario? Where or in which list do you store those email addresses? Is the email column a Person column in the same list?

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

hi v-jefferni

 

1 list

the email column is a people column

 

at the moment my Flow Consists of 

 

Recurrence

Get Items (to pull items from SP list)

Select (1 row Select "Mission Ref" and "Title") 

Compose (union(body('Select'),body('Select'))

 

this is giving me the unique "Title" (Mission Ref) from the list. 

 

but from here i need to get the associated email addresses for each mission ref.

Hi @mrleetyler ,

 

So, you have one list with Title column of Mission Reference values and a People column. Would you like to send emails with different contents based on the Mission Reference to all user emails with the same Mission Reference as well?

 

If so, assuming the people column allows single selection, below is the Flow after your consists for the reference:

vjefferni_0-1626681700496.png

 

Hope this helps.

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

 

 

thanks v_jefferni i can understand the logic there will give that a try and let you know if i have any problems. thanks so much 🙂

hi jefferni,

 

can you clarify where expression you are using for the filter on get items 2 i can see you have outputs( but can't see the rest. i've been playing around with it but can't seem to get it to do the desired result i can tell you are going for.

Hi @mrleetyler ,

 

My bad, I have attached the detailed expression below:

vjefferni_1-1626747074378.png

vjefferni_3-1626747292925.png

 

Filter Query:

Title eq '@{items('Apply_to_each')['Mission Ref']}'

 

Expression:

items('Apply_to_each')['Mission Ref']

 

Hope this helps.

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

doesn't work 100% how i envisioned it in my head but actually works better for my uses so even better!

 

thanks so much for bearing with me and your support!

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Users online (1,903)