web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Help with splitting a ...
Power Apps
Answered

Help with splitting a multi-value person field from SharePoint list in PowerApps

(0) ShareShare
ReportReport
Posted on by 26

Hello, and Happy New Year to you all,

 

I have a SharePoint list which contains a number of columns.  I want to use 2 of those to create a collection within a PowerApp.  The scenario is the list is a list of different teams, and contains details of who is in each team.  A person can be in more than one team.  It contains the following columns (amongst others):

 

TeamName - text field

TeamMembers - a multi-value person field

 

It looks a little like this:

 

RecordIDTeamNameTeamMembers
1HRJim;
Jane;
Bob;
Steve
2FinanceSteve;
Betty;
Ryan
3MarketingAlison;
Jenny

 

Note that the Steve in HR is the same as the Steve in Finance - i.e. he works in 2 teams.

 

The collection I'm trying to achieve would looks something this:

 

TeamNameTeamMember
HRJim
HRJane
HRBob
HRSteve
FinanceSteve
FinanceBetty
FinanceRyan
MarketingAlison
MarketingJenny

 

So 1 record per person, per team.  As Steve is in 2 teams, he has 2 records.

 

The use case here is I want to use this table to manage who can see / edit records within the app.  I want only HR people to be able to edit HR records, only Finance people to be able to edit finance records...etc.  Unfortunately our active directory does not have sufficient detail to use that as the source - this need is more nuanced than that.

 

Any help in how to achieve this would be much appreciated.

 

Thank you in advance

 

Categories:
I have the same question (0)
  • Verified answer
    mdevaney Profile Picture
    29,991 Moderator on at

    @desreed 

    I would suggest using the UNGROUP function to unpack the grouped names.

    ForAll(your_collection_name,
     Collect(my_solution_name,Ungroup(your_collection_name,"TeamMember"))
    );

     

    If you want to show only the TeamName and DisplayName you can take an extra step and use SHOWCOLUMNS.

    ForAll(your_collection_name,
     ShowColumns(
     Collect(my_solution_name,Ungroup(your_collection_name,"TeamMember")),
     "TeamName",
     "DisplayName"
    );

     

    Please note that DisplayName is what the person object gets the employee name from.  You can rename it if you like using RENAMECOLUMNS.

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • desreed Profile Picture
    26 on at

    Thanks @mdevaney. - the UNGROUP function is what sorted it for me.

     

    I couldn't get the formula you had in your second example to quite work, but got what I needed by creating a second collection, using the collection created by your first example as a source and SHOWCOLUMNS.  Exactly what I needed - thank you very much.

  • Staroni Profile Picture
    2 on at

    Can you share the whole solution? How did you collect the Sharepoint Person field in Collection in Power App?

    Thank you in advance

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 494

#2
WarrenBelz Profile Picture

WarrenBelz 352 Most Valuable Professional

#3
11manish Profile Picture

11manish 323

Last 30 days Overall leaderboard