cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
ojack21
Level: Powered On

Unable to GroupBy with Sharepoint List field set to Persons/Group

Hi community,

Is there still an issue with the GroupBy if the field in Sharepoint is Person/Group? My script below won't work, even I know that it is correct, still getting the red underline. What could I possibly be missing here?

 

ProjectLead1 is a Persons/Group column in my Sharepoint list.

 

GroupBy(AddColumns(Project_Tracker, "LeadNames", ProjectLead1.DisplayName), "LeadNames", "ProjectGrouped")

1 ACCEPTED SOLUTION

Accepted Solutions
mdevaney
Level 8

Re: Unable to GroupBy with Sharepoint List field set to Persons/Group

@ojack21 

The display name is a person field cannot be accessed directly using AddColumn so the solution is to use ForAll to build the table instead.

 

GroupBy(
    ForAll(
        Project_Tracker, 
        {LeadNames: LeadNames, ProjectLead1: ProjectLead1.DisplayName}
    ),
    "LeadNames",
    "ProjectGrouped"
)

 

---
Please click "Accept as Solution" if my response helped to solve your issue so that others may find it more quickly. If your thought the post was helpful please give it a "Thumbs Up."

View solution in original post

2 REPLIES 2
mdevaney
Level 8

Re: Unable to GroupBy with Sharepoint List field set to Persons/Group

@ojack21 

The display name is a person field cannot be accessed directly using AddColumn so the solution is to use ForAll to build the table instead.

 

GroupBy(
    ForAll(
        Project_Tracker, 
        {LeadNames: LeadNames, ProjectLead1: ProjectLead1.DisplayName}
    ),
    "LeadNames",
    "ProjectGrouped"
)

 

---
Please click "Accept as Solution" if my response helped to solve your issue so that others may find it more quickly. If your thought the post was helpful please give it a "Thumbs Up."

View solution in original post

ojack21
Level: Powered On

Re: Unable to GroupBy with Sharepoint List field set to Persons/Group

thank you @mdevaney, I fixed this one by changing my field in Sharepoint to Single selection only for this. Still your script is an alternative solution.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 177 members 5,256 guests
Recent signins:
Please welcome our newest community members: