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 / Multiple delimiter to...
Power Apps
Suggested Answer

Multiple delimiter to rows

(1) ShareShare
ReportReport
Posted on by 19
Hi all,
I have this sharepoint list and I need to transform the nmResponsavel and mailResponsavel fields into lines, they are multivalued fields separated by ";"
 
The goal is showing how many items for each user, as it:
 
How can I do it? Using WITH formula or a Collection?
 
 
Categories:
  • Suggested answer
    Nandit Profile Picture
    1,568 Moderator on at
    Hi 
     
    I have managed to achieve it but I am trying to create a better code for this. 
    Here;s my data in a collection (Data) :
     
    Here's my code on a button:
    Clear(colUsers);
    Clear(colEmails);
    Clear(colUsers2);
    Clear(colEmails2);
    ForAll(
        Data As Item,
        With(
            {
                Users: Split(
                    Item.nmResponsavel,
                    "; "
                ),
                Emails: Split(
                    Item.mailResponsavel,
                    "; "
                )
            },
            //Collect Users
            Collect(
                colUsers,
                Users
            );
            //Collect Emails
            Collect(
                colEmails,
                Emails
            )
        )
    );
    //Add Row Number
    ClearCollect(
        colUsers,
        ForAll(
            Sequence(CountRows(colUsers)),
            Patch(
                Last(
                    FirstN(
                        colUsers,
                        Value
                    )
                ),
                {RowNumber: Value}
            )
        )
    );
    //Add Row Number
    ClearCollect(
        colEmails,
        ForAll(
            Sequence(CountRows(colEmails)),
            Patch(
                Last(
                    FirstN(
                        colEmails,
                        Value
                    )
                ),
                {RowNumber: Value}
            )
        )
    );
    //Change Column Name to User
    ClearCollect(
        colUsers2,
        RenameColumns(
            colUsers,
            Value,
            User
        )
    );
    //Change Column Name to Email
    ClearCollect(
        colEmails2,
        RenameColumns(
            colEmails,
            Value,
            Email
        )
    );
    //Final Collection with Email and Blank User Column
    ClearCollect(
        colFinal,
        AddColumns(
            colEmails2,
            User,
            " "
        )
    );
    //Patch User to the final collection using a LookUp
    ForAll(
        colFinal As Item,
        Patch(
            colFinal,
            Item,
            {
                User: LookUp(
                    colUsers2,
                    RowNumber = Item.RowNumber
                ).User
            }
        )
    )
    Here's my final collection (colFinal):
     
    My code is long but works. Hoping someone would be able to come up with a shorter version of this. 
     
    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!

     
     
     
  • Nandit Profile Picture
    1,568 Moderator on at
    Hi,

    Following up to check if you were able to solve this issue using my suggestion?

    Kind regards,
    Nandit

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 432 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 347

#3
WarrenBelz Profile Picture

WarrenBelz 254 Most Valuable Professional

Last 30 days Overall leaderboard