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 / Create collection and ...
Power Apps
Answered

Create collection and split

(0) ShareShare
ReportReport
Posted on by 13

Hi!

 

I have a table with a column that is multiline and I am trying to divide that line and have the rest of the columns repeat, I have been trying for several days.

 

I have this

column acolumn bcolumn c
text 1text 2text3-1
text3-2

 

And I want to create a collection like this

column acolumn bcolumn c
text 1text 2text3-1
text 1text 2text3-2

 

 

Categories:
I have the same question (0)
  • Verified answer
    Kirkby Profile Picture
    659 Moderator on at

     

     

    Hi @ASDFASF 

     

      First, check if the SharePoint list uses char(10) for line feed.

    If parsing using char(10) works, parse the whole list.

     

    confidential_Parse48 19 ddd.png

    confidential_Parse48 19.png

     

    1)found out that SPO list uses char(10) for line feed.

    confidential_Parse48 19 (2).png

     

    2) Create ColParsed and fill the collection with parsed data from the columns ID(=columnA), Title(=columnB), and MultiLineColumn(=columnC), instead of using columnA, columnB, and columnC. I hope this won't cause any confusion

     

     

    confidential_Parse48 19 (3).png

    /* syntax for working with column columnA, columnB, and columnC is... */

     

     

    ClearCollect(ColParsed,Blank());


    ForAll(
            ColSample,
            ForAll(
                Split(columnC, Char(10)),  // Split the multiline text into individual lines using the newline character (Char(10))
                Collect(ColParsed, {
                    columnA:ColSample[@columnA],
                    columnB: ColSample[@columnB] ,
                    columnC:Value
                  }
                )
            )  
           );
    I hope this helps.
     
    Kirkby
  • ASDFASF Profile Picture
    13 on at

    Thank  you very much Kirkby! it worked like a charm

     

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 528

#2
WarrenBelz Profile Picture

WarrenBelz 426 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 306

Last 30 days Overall leaderboard