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 / How to add date/timest...
Power Apps
Answered

How to add date/timestamp to RichTextEditor field of SharePoint List column before each log entry

(0) ShareShare
ReportReport
Posted on by 44

Hello,

I have attempted many different formulas for adding a date/timestamp with username or email of person who created the entry before each entry of a log column which uses a Rich Text Editor field.  I've tried many different syntax of Patch, UpdateContext, Date, DateAdd, etc.  Nothing works.  Can Rich Text Editor not have date/timestamp added?  I've viewed many YT videos and blog entries here in the community of how to do this, but have yet to be successful within my app.  Not using a basic text box or label.  Using a Rich Text Editor field.

 

How can I add a date/time stamp?  Below is my powerapps information:

 

Location - EditForm1>Log DataCard>RichTextEditor1. 

       RichTextEditor1: Default set to - ThisItem.'Log" - Log pulling data from SP list column

       Submit Button: OnSelect set to - (see below)

 

Patch("List", BrowseGallery1.Selected, {'Log': User().Email & ":" & Char(10) & Char(10) & Text(Now(), "[$-en-US]m/d/yy" & RichTextEditor1.HtmlText & Char(10) & Char(10) & BrowseGallery1.Selected.'Log'});

SubmitForm(EditForm1);

 

No errors occur when using this, however, it does not produce the desired results. 

 

What am I doing wrong?  Am I placing this in the wrong location? Instead of on the submit button, maybe somewhere else? Or should I use a different function?

 

Any help will be greatly appreciated. Thank you.

Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    153,717 Most Valuable Professional on at

    Hi @Shannah_Bonner ,

    The issue is that your SubmitForm immediately after the Patch will overwrite whatever you have patched with the content of the Rich Text box. Try putting the Patch on the OnSuccess of the Form and if you are always going to Patch this, remove the Update on the Data Card containing the Rich Text box.

     

    Please click Accept as solution 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 giving it Thumbs Up.

    Visit my blog Practical Power Apps

  • Shannah_Bonner Profile Picture
    44 on at

    This worked beautifully!!!  Thank you so much!  I'm just glad I had the formula right!  The only change I made, once I saw how the date and user email was added, was to rearrange the user email as first, then the date.  Accepting as solution.  Have a great weekend!

  • Shannah_Bonner Profile Picture
    44 on at

    Hi @WarrenBelz 

    Another problem has presented itself.  Now, the entries duplicate themselves each time an entry is made.  But this doesn't occur when I do it.  Only when another colleague makes an entry.  Could this be permission related?  Any help is greatly appreciated.  Thank you.

  • WarrenBelz Profile Picture
    153,717 Most Valuable Professional on at

    Hi @Shannah_Bonner ,

    I must admit that baffles me as well.  Have you removed the Update from the Data Card?

  • Shannah_Bonner Profile Picture
    44 on at

    Yes, I removed the update from the Data Card. I believe I found the issue. Here is my previous code:

     

    Patch(source, BrowseGallery1.Selected, {'Log': Text(Now(), "[$-en-US]m/d/yy") & " - " User().Email & ":" & Char(10) & Char(10) & RichTextEditor1.HtmlText & Char(10) & Char(10) & BrowseGallery1.Selected.'Log'});

     

    I removed the 2nd set of Char(10) and BrowseGallery1.Selected.'Log' from the code.  Code now is:

     

    Patch(source, BrowseGallery1.Selected, {'Log': Text(Now(), "[$-en-US]m/d/yy") & " - " User().Email & ":" & Char(10) & Char(10) & RichTextEditor1.HtmlText & Char(10) & Char(10)

     

    My colleagues are stating it is still producing duplicates.  I will try removing everything after RichTextEditor1.HtmlText.  Hopefully this works.  

     

    Any ideas are appreciated.  Thank you.

     

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…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Kalathiya Profile Picture

Kalathiya 445

#2
WarrenBelz Profile Picture

WarrenBelz 386 Most Valuable Professional

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 321 Super User 2025 Season 2

Last 30 days Overall leaderboard