Skip to main content

Notifications

Power Apps - Building 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:
  • ASDFASF Profile Picture
    ASDFASF 13 on at
    Re: Create collection and split

    Thank  you very much Kirkby! it worked like a charm

     

     
  • Verified answer
    Kirkby Profile Picture
    Kirkby 647 on at
    Re: Create collection and split

     

     

    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

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,567

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,907

Leaderboard