cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
Super User
Super User

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
Super User
Super User

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

Highlighted
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 Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps 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

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (4,903)