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 / Patch to Append to Mul...
Power Apps
Answered

Patch to Append to Multiple Line of Text Column

(0) ShareShare
ReportReport
Posted on by 15

I have a checkbox in a gallery.  When I select it, I want to have the code in the On Check property add the ThisItem.Result of the gallery to the existing contents in a multiple line of text column in a SharePoint List.

 

This is the code I tried:

Patch(SP_List_Name,First(Filter(SP_List_Name(Title=DropdownBox.Selected.Result)),{MultiLineofTextColumn: & ThisItem.Result})

 

It gives me an error on the &.  Without the &, it overwrites the existing contents of the column,

 

Notes:
First/Filter Title/Dropdown select record to update.

ThisItem.Result is the result of Items property of the gallery Sort(Distinct(SPList,Column),Result)

 

I tried to follow the solution given in this post https://powerusers.microsoft.com/t5/Building-Power-Apps/Append-all-version-comments-to-a-multiple-line-text-box-using/m-p/424095 but I was unsuccessful.

 

Thanks in advance,

Kim

Categories:
I have the same question (0)
  • DavidZoon Profile Picture
    738 Most Valuable Professional on at

    Hello,
    You have to add existing data in your patch:

    Replace : {MultiLineofTextColumn: & ThisItem.Result}
    By : {MultiLineofTextColumn: ThisItem.MultiLineofTextColumn& "

    "& ThisItem.Result}

    (hit Return between "" to have one value per line in your field)

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily.

  • CU23071122-0 Profile Picture
    71 on at

    Make sure your multiline is not rich text in your list or dataset.  If it is turn that off it will then act as a normal text box value. Otherwise you have to use HTML coding to make it work..

  • Kandrus617 Profile Picture
    15 on at

    It didn't recognize ThisItem.MultiLineofTextColumn, so it gave me an error.

  • Kandrus617 Profile Picture
    15 on at

    Here's an example.  There are two lists.  The first list has every class available in the high school (PE, music, english, math, social studies, science.)  The second list has two columns. The first column has every student's name and the second column is a multi line of text column.  As students pass their classes, those classes are added to the multi line of text column.  

    That's why my thought was to use a drop down with students's name and a gallery with each class.  Then On Check, appends the new class to the existing classes in the multi-line of text column.

  • Verified answer
    Kandrus617 Profile Picture
    15 on at

    So, I googled some more and here is how I was able to make it work:

     

    1) Retrieve the existing items from the multi-line of text column into a collection

    2) Add the new checked item to the collection

    3) Patch the collection back to the multi-line of text column

     

    //Step 1//

    ClearCollect(collection,Lookup(SP_List_Name,Title=DropdownBox.Selected.Result,MultiLineofTextColumn));

     

    //Step 2//

    Collect(collection,ThisItem.Result);

     

    //Step 3//

    Patch(SP_List_Name,First(Filter(SP_List_Name,Title=DropdownBox.Selected.Result)),{MultiLineofTextColumn: Concat(collection,collectionColumnName & Char(10) )});

     

    Reset(CheckBox)

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 April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 1,055

#2
Valantis Profile Picture

Valantis 666

#2
11manish Profile Picture

11manish 666

Last 30 days Overall leaderboard