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 / Creating a comment fie...
Power Apps
Answered

Creating a comment field with date stamp and becomes Read Only upon submission

(0) ShareShare
ReportReport
Posted on by 509

Is there a way date stamp a comments/free text field and make it Read Only upon submission? 

 

So for example: 

Work notes:
26/02/2020 11:18:39 -Terry Edwards Emailed Rachel and attached a CfE document - early draft
26/02/2020 11:17:54 - Terry Edwards introduced Rob to Tracey Jacks

Categories:
  • WarrenBelz Profile Picture
    156,543 Most Valuable Professional on at

    Hi @darrenfloyd666 ,
    For your two questions - the second one would have on the DisplayMode

    If(
     !isBlank(YourControlName.Text),
     DisplayMode.View,
     DisplayMode.Edit
    )
     

    however you seem to have multiple notes in your example and you cannot make part of a field a different mode.
    The date stamp would also be problematic - easy enough to add it to the start of a note on submission - in the Update property of the card

    Text(Now(),"dd/mm/yyyy hh:mm:ss") & " - " & YourControlName.Text

    There are also other ways of doing this.Is this what you are seeking?

     

    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.

     

  • eka24 Profile Picture
    20,925 on at

    Kindly watch this video:
    https://youtu.be/SaDEVOgOlYY?t=6

     

    On the confirmation / submission label, you can join the various input fields / datefields:

    User().FullName&":"&" "&DatePicker.SelectedDate&” “&Textbox1.Text

     

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • sutekh Profile Picture
    509 on at

    Hi @eka24 and @WarrenBelz 

     

    What I did was create a Flow which updated the item and in the comments and I put the uctNow expression in for the date, but it doesn't create a date stamp for multiple entries and doesn't make it Read Only (I might push back on the Read Only requirement as the user won't be able to add additional comments...

     

    Any idea how I could add date stamps for multiple entries?

  • WarrenBelz Profile Picture
    156,543 Most Valuable Professional on at

    Hi @darrenfloyd666 ,

    I can't test this fully, but something like 

    Text(Now(),"dd/mm/yyyy hh:mm:ss") & " - " & 
    Substitute(
     YourFieldName,
     char(10),
     char(10 & Text(Now(),"dd/mm/yyyy hh:mm:ss") & " - "
    )

    would put the date and time at start of each line, but I am not sure this is what you are asking.

  • sutekh Profile Picture
    509 on at

    Thanks @WarrenBelz I presume that formula would go in PowerApps, which property would I put that in? Items? 

  • WarrenBelz Profile Picture
    156,543 Most Valuable Professional on at

    Hi @darrenfloyd666 ,

    The Update property of the card that the text control is in.

    As I mentioned, there are other ways of doing this including using Patch or UpdateIf to write to the field, but that would depend on what else you were want to write back at the time.

     

  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @darrenfloyd666 ,

    Could you please share a bit more about your scenario?

    Do you want to add comment text within the comment field along with date time value?

     

    The user @JimmyWork has faced similar issue with you, please check my response within the following thread:

    https://powerusers.microsoft.com/t5/Building-Power-Apps/Patching-to-SharePoint-column-getting-the-latest-Text-on-top/td-p/417071

     

    On your side, you need to configure your Multiple Lines Text type field as below:

    1.JPG

    Then you could generate an app based on your SP List data source (I suppose), go to the Edit form, set the Update property of the "Comment" field data card to following formula:

    "<span style='font-size:12pt'>"& Now() &"</span> " & " - " & RichTextEditor1.HtmlText & Char(13) & Gallery1.Selected.'Case Comments'

    I assume that you use Rich Text Editor control to enter your comments, on your side, you should replace it with actual control name (using which to enter your comment).

     

    Please take a try with above solution, check if the issue is solved.

     

    Best regards,

  • sutekh Profile Picture
    509 on at

    Hi @v-xida-msft 

     

    That's exactly the outcome I want. I made the changes you suggested.

     

    My gallery is called GAL_Ideas and the freetext field is called Work_Notes. Config below. I'm getting a 'Name isn't valid...' error, seems to be around the RichTextEditor line. Where am I going wrong? 

     

    FridayWorknotes.png

    Oh, and now I can't add any text into the Work_Notes via the app, I can only add it via the list. 

  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @darrenfloyd666 ,

    Within the Update formula, please replace the RichTextEditor1.HtmlText with actual Text Input box control name within the Work Notes data card.

     

    You may need to type following formula:

    "<span style='font-size:12pt'>"& Now() &"</span> " & " - " & WorkNotesTextInputBox.Text & Char(13) & Gallery1.Selected.'Case Comments'

     

    Please modify your formula as above mentioned, check if the issue is solved.

     

    Best regards, 

  • sutekh Profile Picture
    509 on at

    Fantastic! That's nearly working. It date and time stamps it. Brilliant. However it doesn't include the comment I submitted. It says the time/date and 'Work_Notes'

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 405 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 368

#3
WarrenBelz Profile Picture

WarrenBelz 244 Most Valuable Professional

Last 30 days Overall leaderboard