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 / Creating a delimited C...
Power Apps
Answered

Creating a delimited Collection from another Collection

(0) ShareShare
ReportReport
Posted on by 20

Hi Power Apps Community!

 

I have created a Collection in a PowerApp which pulls data from a SharePoint list column which has been stored in a delimited format (example below):

 

Members
1;John Doe;John.Doe@examplemail.com;1000001;1000;2;David Doe;David.Doe@examplemail.com;1000002;1500
1;Sarah Doe;Sarah.Doe@examplemail.com;1000003;500;2;John Doe;John.Doe@examplemail.com;1000001;2000;3;Alfred Doe;Alfred.Doe@examplemail.com;1000004;2500
1;Steve Doe;Steve.Doe@examplemail.com;1000005;5000;2;Paul Doe;Paul.Doe@examplemail.com;1000006;2000;3;Alfred Doe;Alfred.Doe@examplemail.com;1000004;3000

 

The data stored in each line of the Collection always has 5 fields (separated by ';') per individual and can contain up to 10 individuals (so would be repeated 10 times giving a total of 50 fields) per row.  There are no blanks to be concerned about.

 

I am looking at converting all rows in this collection into a new Collection in the following format:

 

SerialNameEmailStaffIDValue
1John DoeJohn.Doe@examplemail.com10000011000
2David DoeDavid.Doe@examplemail.com10000021500
1Sarah DoeSarah.Doe@examplemail.com1000003500
2John DoeJohn.Doe@examplemail.com10000012000
3Alfred DoeAlfred.Doe@examplemail.com10000042500
1Steve DoeSteve.Doe@examplemail.com10000055000
2Paul DoePaul.Doe@examplemail.com10000062000
3Alfred DoeAlfred.Doe@examplemail.com10000043000

 

Is it possible to achieve this using PowerApps?

 

Cheers!

Categories:
I have the same question (0)
  • Michael E. Gernaey Profile Picture
    53,963 Moderator on at

    Hi @XenDance 

     

    Real fast, is there a carriage return at the end of each line? Or if it just all one big string with delimiters? Just want to validate before I write the full answer.


    If I have helped you, I would really appreciate if you please Mark my answer as Resolved/Answered, and give it a thumbs up, so it can help others

    Cheers

    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

  • mmbr1606 Profile Picture
    14,629 Super User 2026 Season 1 on at

    Hey @XenDance 

     

    Can you try something like this please:

     

    ClearCollect(NewCollection); // Initialize the new collection to store the transformed data

    ForAll(

        OriginalCollection, // Assuming 'OriginalCollection' is your original collection name

        ForAll(

            Sequence(RoundDown(Len(Members)/10, 0)), // Calculate how many members are in each row (assuming each has 5 fields)

            Collect(

                NewCollection,

                {

                    Serial: Value(Mid(Members, (Value-1)*50+1, 1)), // Extract Serial, adjusting indexes appropriately

                    Name: Mid(Members, (Value-1)*50+3, Find(";", Members, (Value-1)*50+3)-(Value-1)*50-3), // Extract Name

                    Email: Mid(Members, Find(";", Members, (Value-1)*50+3)+1, Find(";", Members, Find(";", Members, (Value-1)*50+3)+1)-(Find(";", Members, (Value-1)*50+3)+1)), // Extract Email

                    StaffID: Value(Mid(Members, Find(";", Members, Find(";", Members, (Value-1)*50+3)+1)+1, Find(";", Members, Find(";", Members, Find(";", Members, (Value-1)*50+3)+1)+1)-(Find(";", Members, Find(";", Members, (Value-1)*50+3)+1)+1))), // Extract StaffID

                    Value: Value(Mid(Members, Find(";", Members, Find(";", Members, Find(";", Members, (Value-1)*50+3)+1)+1)+1, 5)) // Extract Value

                }

            )

        )

    );

     

    Be aware that you might need to rename a few things

     

    Let me know if my answer helped solving your issue.

    If it did please accept as solution and give it a thumbs up so we can help others in the community.



    Greetings

  • Verified answer
    v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @XenDance ,

     

    I made a sample for you.

    ClearCollect(Col,
    {Members:"1;John Doe;John.Doe@examplemail.com;1000001;1000;2;David Doe;David.Doe@examplemail.com;1000002;1500"},
    {Members:"1;Sarah Doe;Sarah.Doe@examplemail.com;1000003;500;2;John Doe;John.Doe@examplemail.com;1000001;2000;3;Alfred Doe;Alfred.Doe@examplemail.com;1000004;2500"},
    {Members:"1;Steve Doe;Steve.Doe@examplemail.com;1000005;5000;2;Paul Doe;Paul.Doe@examplemail.com;1000006;2000;3;Alfred Doe;Alfred.Doe@examplemail.com;1000004;3000"}
    )
    ClearCollect(Col2,Ungroup(ForAll(Col,With({temp:Split(Members,";")},ForAll(Sequence(CountRows(temp)/5,0),{Serial:Index(temp,Value*5+1).Value,Name:Index(temp,Value*5+2).Value,Email:Index(temp,Value*5+3).Value,StaffID:Index(temp,Value*5+4).Value,Value:Index(temp,Value*5+5).Value}))),"Value"))

    vxiaochenmsft_0-1707375502483.png

     

    Best Regards,

    Wearsky

  • XenDance Profile Picture
    20 on at

    Thanks for your responses! 🙂

     

    @mmbr1606, unfortunately I was unable to get your answer to work with my collection - it provided me with 20+ results and split the strings the wrong length (e.g. john.do;e@examplemail.com) into different columns.

     

    @v-xiaochen-msft, this worked perfectly. Thank you for this solution!

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

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 320 Most Valuable Professional

#2
11manish Profile Picture

11manish 210

#3
Valantis Profile Picture

Valantis 167

Last 30 days Overall leaderboard