web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Patch rich text editor...
Power Apps
Unanswered

Patch rich text editor to Sharepoint to add to existing text

(0) ShareShare
ReportReport
Posted on by 105

Hi

I have an app connected to a Sharepoint contacts list.  I am wanting to add to the notes section in this list, which already has information in some cases.  I have made that column (notes (comments) ) an enhanced rich text column.

In my app I have a gallery with populated information from the sharepoint contacts list.  I have an HTML text box to show the information already in the notes(comments) column.  I added a rich text editor into the gallery, so information can be added to this column.

The first image shows the screen set up

The second image shows the patch formula I used first.  This works, however, it just changes the information not add to it. 

the third image I tried @Anonymous Young's videos showing this formula, however, I had no joy with that either. just tells me requires title and then when I add it doesn't recognise it.

powerapps richtext editor patch issue.png

 

Can anyone direct me as to where i'm going wrong

 

Categories:
I have the same question (0)
  • EddieE Profile Picture
    4,641 Moderator on at

    @Alderney 

    For the notes column you should be able to just add this

    Patch(
     ...
     { ...
     'Notes (Comments)': $"{ThisItem.'Notes (Comments)'} RichTextEditor1.HtmlText"
     }
    // I haven't added all of your code but hopefully this makes sense?
    // You can add anything extra you want inside of the "" above but if you are using data point place them inside of {...} like I've done above

     

     

  • Alderney Profile Picture
    105 on at

    @EddieEthanks for your help!

    I tried your coding, and it works, however, it just puts in the last part ie RichTextEditor.HtmlText, and it put it below.

    Here is my code


     

    Patch(
     'NZ Schools Contacts', 
     {ID: Gallery1.Selected.ID},
     {
     Title: ThisItem.'Full Name'}, 
     {'Notes (Comments)': $"{ThisItem.'Notes (Comments)'} RichTextEditor1.HtmlText"
     }
    )
    
    ​

     

    Result on test screen

    powerapps richtext patch issue2.png

  • EddieE Profile Picture
    4,641 Moderator on at

    @Alderney 

    Whoops, my bad, should've been this

    Patch(
     'NZ Schools Contacts', 
     {ID: Gallery1.Selected.ID},
     {
     Title: ThisItem.'Full Name'}, 
     {'Notes (Comments)': $"{ThisItem.'Notes (Comments)'} {RichTextEditor1.HtmlText}"
     }
    )
    
    ​

     

     

  • Alderney Profile Picture
    105 on at

    @EddieE 

    Great Thanks Eddie, It's working, is there a way of doing it so it goes on the top of existing information not the bottom? Any ideas how to reset the editor, adding Reset(RichTextEditor1) doesn't work after the last )

  • Verified answer
    EddieE Profile Picture
    4,641 Moderator on at

    @Alderney 

    To show them in reverse order just reverse the way they are Patched, ie

    Patch(
     'NZ Schools Contacts', 
     {ID: Gallery1.Selected.ID},
     {
     Title: ThisItem.'Full Name'}, 
     {'Notes (Comments)': $"{RichTextEditor1.HtmlText} {ThisItem.'Notes (Comments)'}"
     }
    )

     

    To clear the RichText Editor, if you set its Default property to "" then use Reset(RichTextEditor1) this will work.

  • Alderney Profile Picture
    105 on at

    @EddieE  Thanks so much!

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard