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 / Populate the gallery f...
Power Apps
Suggested Answer

Populate the gallery from multiple lines of text

(0) ShareShare
ReportReport
Posted on by 90
 
I need to populate the gallery in EditForm from multiple lines of text . Multiple lines of text has Actual Work;Task Group which is separated by semicolon. May i know how to populate the right gallery?
 
DataCard update 
 
Concat(
   colItems,
   Value,
   ";"
)
I have the same question (0)
  • Vish WR Profile Picture
    2,285 on at
     
     
     
    Load data into a collection
    Split the text into rows and columns:
     
    ClearCollect(
        colItems,
        ForAll(
            Split(Parent.Default, Char(10)),
            With(
                { parts: Split(Result, ";") },
                {
                    ActualWork: First(parts).Result,
                    TaskGroup: Last(parts).Result
                }
            )
        )
    )

    Bind to Gallery 
    Items = colItemsItems = colItems

    Save back to field

    Concat(

        colItems,

        ActualWork & ";" & TaskGroup,

        Char(10)

    )

     
    Vishnu WR
     
    Please âœ… 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 answering Yes to Was this reply helpful? or give it a Like â™¥
  • Suggested answer
    11manish Profile Picture
    2,028 on at
    To populate a gallery from a multi-line text field containing semicolon-separated values, first split the text by line breaks to create rows, then split each row by ;
     
    to extract columns, bind this to a collection for the gallery, and use Concat() to save the updated values back in the same format.
     
    you can try below to Load data into a collection (for Gallary)
     
    ClearCollect(
        colItems,
        ForAll(
            Filter(
                Split(Coalesce(ThisItem.'Multiple Lines Field', ""), Char(10)),
                !IsBlank(Result)
            ),
            With(
                { parts: Split(Result, ";") },
                {
                    ActualWork: Trim(First(parts).Value),
                    TaskGroup: Trim(Last(parts).Value)
                }
            )
        )
    )
     
  • WarrenBelz Profile Picture
    155,262 Most Valuable Professional on at
    It is a bit unclear exactly what is in the left pane, but assuming the record there contains the Text Field where the two values need to be split into the right field, then the Split function is certainly the correct path, however the output is Value, not Result - this was changed a couple of years back, but ChatGPT (for example) still thinks it is Result.
     
    To your issue, you have not posted what code is on the Add button or the Items of both galleries, but assuming you are making a collection, the code would be something like
    Collect(
       CollectionName,
       Split(
          GalleryName.Selected.YourTextFieldName,
          ";"
       )
    )
    I suspect you may want to do somthing different here, if so, the details mentioned above are needed to see how you can get the information from the left panel to the right one in the format required.
     
    Please ✅ 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 answering Yes to Was this reply helpful? or give it a Like ♥
    Visit my blog
    Practical Power Apps    LinkedIn  

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
Vish WR Profile Picture

Vish WR 936

#2
Valantis Profile Picture

Valantis 602

#3
11manish Profile Picture

11manish 598

Last 30 days Overall leaderboard