Skip to main content

Notifications

Power Automate - Building Flows
Unanswered

Group by Email

Posted on 12 Sep 2024 12:32:57 by 2
Hi together,

I have a Sharepoint List with two person columns: 1) User 2) Responsible.
In the list are multiple records with lots of users. Each user has a responsible person. The responsible person can have multiple users. So as an example it could look like this:
 
Users Responsible
Mark Thomas
Jeff Joe
Donald Thomas
Jose Thomas
Jenifer Joe
 
So in this example Mark, Donald and Jose are under the responsibility of Thomas.
 
For my Flow I want to send a single email to Thomas and Joe with a list of the users they are responsible of.
 
I tried many methods, especially the ones that are out there in the internet, but none of them worked. I would really appreciate any help!
  • Chriddle Profile Picture
    Chriddle 7,028 on 12 Sep 2024 at 14:13:55
    Group by Email
    Using XML and XPath:
    Create an array of unique "Responsible" (In Select's "From")
    Select all "User" with this "Responsible" (In Select's "Map Users")
     

    Select

    From:

     xpath(
    	xml(json(concat('{"Root":{"Item":', outputs('Compose'),'}}'))),
    	'//Responsible[not(preceding::Responsible=.)]/text()'
    )

    Map Responsible:

    item()

    Map Users:

     xpath(
    	xml(json(concat('{"Root":{"Item":', outputs('Compose'),'}}'))),
    	concat('//Item[Responsible="' , item(),'"]/User/text()')
    )
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,137

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,813

Leaderboard