Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Suggested answer

Split multiperson column into rows

(0) ShareShare
ReportReport
Posted on by 14
Hi all
I have this SharePoint list
ID SurveyID ThemeID Order Question Responsible
109 2 1 3 pergunta teste Johnson, Bruce
Field, Sally
108 2 2 2 Teste pergunta composto Nyugen, Sam
Johnson, Bruce
94 10 6 68 A avaliação do resultado dos treinamentos é verificada por meio de: Field, Sally
 
Loaded in my canvas app named ColQuestions, now I need to convert column Responsible in rows, like this:
 
ID SurveyID ThemeID Order Question Responsible
109 2 1 3 pergunta teste Johnson, Bruce
109 2 1 3 pergunta teste
Field, Sally
108 2 2 2 Teste pergunta composto Nyugen, Sam
108 2 2 2 Teste pergunta composto
Johnson, Bruce
94 10 6 68 A avaliação do resultado dos treinamentos é verificada por meio de: Field, Sally
 
 
How can I get this result?
  • Nandit Profile Picture
    1,563 Super User 2025 Season 1 on at
    Split multiperson column into rows
    I just noticed you mentioned its a Multiperson column, please disregard my suggestion and use WarrenBelz's suggestion, it will work perfectly!
  • Suggested answer
    Nandit Profile Picture
    1,563 Super User 2025 Season 1 on at
    Split multiperson column into rows
     
    You will need a delimiter like ";" between the names in the Responsible column. 
    Quick question what type of column is Responsible in your SharePoint list?
     
    If you have a Delimiter ";", you can use the following code to generate the output you require - 
    I created the dummy dataset as a collection:
    ClearCollect(
        colQuestions,
        {
            ID: 109,
            SurveyID: 2,
            ThemeID: 1,
            Order: 1,
            Question: "Test",
            Responsible: "Johnson, Bruce;
    Field, Sally"
        },
        {
            ID: 108,
            SurveyID: 2,
            ThemeID: 1,
            Order: 1,
            Question: "Test2",
            Responsible: "Nyugen, Sam;
    Johnson, Bruce"
        }
    )
    Then I run the following code to create the required output:
    ForAll(
        colQuestions As Record,
        ForAll(
            Split(
                Record.Responsible,
                ";"
            ) As Person,
            Collect(
                colQuestions_Converted,
                {
                    ID: Record.ID,
                    SurveyID: Record.SurveyID,
                    ThemeID: Record.ThemeID,
                    Order: Record.Order,
                    Question: Record.Question,
                    Responsible: Person.Value
                }
            )
        )
    )
    Here's how it looked:
     
    Hope this helps. 
     
    Kind regards, 
    Nandit
     
    If this answers your query, please mark this response as the answer.
    If its helpful, please leave a like. Thanks!
     
  • WarrenBelz Profile Picture
    146,645 Most Valuable Professional on at
    Split multiperson column into rows
    Use the Ungroup function
    Ungroup(
       SPList,
       Responsible
    )
    Note that the amount of records able to be addressed is restricted to your Data Row Limit.
     
    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)     Visit my blog Practical Power Apps    Buy me a coffee

     

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,645 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,997 Most Valuable Professional

Leaderboard