Showing results for 
Search instead for 
Did you mean: 
Level 8

Patch and richtext carret/prompt



As my users close the powers apps windows or swith for a Team tab to another, they loose their record...


I setup a timer, and patch richtext in order to update my SP list


when it's done, the prompt/carret is set on the beginning of the richtext... My solution does not work, how to you handle such needs ?


Thx in advance


Microsoft Employee

Re: Patch and richtext carret/prompt

Hello @Jdriele ,

I don't think there's a way to get/set the cursor position in the RichTextEditor control. Are you using the RichTextEditor.HtmlText in your Patch function? Have you tried storing the content in a variable on every change (RichTextEditor1.OnChange=Set(copy, RichTextEditor1.HtmlText)) and then patch that variable? If that does not work, I would recommend having a "dirty" flag (RichTextEditor1.OnChange=Set(isChanged, true)) and have a red border around the RichTextEditor when it is true (optionally, you can unhide a warning message as well letting the user know that the changes are not saved). When user saves the content, you can reset the flag (and hide the message).

Hope that helps.

Level 8

Re: Patch and richtext carret/prompt


Here my code (with or without variable return the same problem)

UpdateContext({autosaveBody: RichTextBoxBody.HtmlText});
UpdateContext({autosaveFeedback: RichTextFeedback.HtmlText});
UpdateContext({autosaveID: galleryTopics.Selected.ID});


Dirty flag, why not but it does not solve the problem of my users.
The cursor/carret move because of Patch (only if new data)



Patch is needed as the risk is that people 

  1. close tab in web browser
  2. change tab in Teams

So far, Powerapps didn't alert user when he closes tab (1) or change (2)

Helpful resources


Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.


Demo Extravaganza Championship Voting Open

Voting Ends: October 30, 2019!


Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020


Power Platform World Tour

Coming to a city near you


PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!


Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

Top Kudoed Authors
Users Online
Currently online: 185 members 4,706 guests
Please welcome our newest community members: