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

Community site session details

Session Id : 1Xt/CNj1hosCL/ZWiIZ83v
Power Apps - Building Power Apps
Answered

Canvas App Comment History

Like (1) ShareShare
ReportReport
Posted on 25 Dec 2022 15:33:56 by 36

I am working on creating a comment history and having trouble fine tuning a couple items. 

1)  How do I get the last comment to show on top? Right now new entries go to the bottom

2) If the textinput filed is blank to not record and entry.

 

Scheduler Comment Card has this for the Update value.

ThisItem.'Scheduler Comment History'&Char(13)&TextInput1.Text&" "&Text(Now()," "&User().FullName&" "& ShortDateTime)&Char(13)

 

The first text field is a inserted text input field called TextInput1. I am using it to capture comments to append to a SharePoint list column called Scheduler Comment.  It works great but would like to fine tune it based upon the question above.

DLJ_0-1671982242166.png

 

Categories:
  • DLJ Profile Picture
    36 on 26 Dec 2022 at 13:40:06
    Re: Canvas App Comment History

    @TBitly Thanks for taking the time to write out the expression for me. Many do not take the time to do that and for those of use not good at coding it helps us.

     

    Lots of videos on the internet showing how to apply this concept using Patch to a Gallery which is not what I was wanting to do. Here is my simple solution to a simple form.

     

    Final Solution:

    This is a Power App form created from a SharePoint List. I have a column called Scheduler Comment set to multi line plain text. This generates a Data Card in the form when created. Below I have two Text Input fields in the data card. The #2 is the default TextInput DataCardValue9 created with the card. I unlocked the card and inserted a new TextInput field (#1) that is not linked to the SharePoint List called TextInput1. I set both inputs as multi line plain text. I set #2 to View so users can't edit the data. Using #1 as the data input, when I save the form the information is stored into #2 as a history. Below is the working solution provided by @TBitly help. You can see by the time stamps that last comment is now on top. Added Char(13) to make each entry its own line.

     

    Scheduler Comment Data Card: Update Control:

    If(Not(IsBlank(TextInput1.Text)),TextInput1.Text&" -- "&User().FullName&" "&Text(Now(),ShortDateTime)&Char(13)&ThisItem.'Scheduler Comment'&Char(13),ThisItem.'Scheduler Comment')

    DLJ_1-1672061292973.png

     

     

  • Verified answer
    TBitly Profile Picture
    86 on 26 Dec 2022 at 03:22:21
    Re: Canvas App Comment History

    So the textinput1 is the text input area under the Scheduler Comment, correct? And, the comment history is under textinput1 which is fetching the values from a multiline text column in SP list..correct? 

    If so, then I would recommend not appending the new text.. instead I would just update on patch using this formula on save/submit etc

     

    If(
    Not(IsBlank(TextInput1.Text)),
    
    TextInput1.Text&" -- " & User().FullName & Text(Now(),ShortDateTime) & Char(13)& ThisItem.'Scheduler Comment',
    
    ThisItem.'Scheduler Comment'
    )

     

     

    I hope this helped. Let me know if I did not answer the question..

     

    Thanks

  • DLJ Profile Picture
    36 on 26 Dec 2022 at 02:00:40
    Re: Canvas App Comment History

    Correct. In the picture I would want the second comment to be on top. So as any comments are added they are always on top.

  • v-qiaqi@microsoft.com Profile Picture
    on 26 Dec 2022 at 01:48:34
    Re: Canvas App Comment History

    Hi @DLJ,

    What do you mean by the last comment? Do you mean the comment you entry now?

     

    There are two comments within the TextInput, you want the second comment to be on the top, right?

     

  • TBitly Profile Picture
    86 on 26 Dec 2022 at 00:28:54
    Re: Canvas App Comment History

    You would just place the comment in comment history box at the end of concatenation..

     

    If(Not(IsBlank(TextInput1.Text)), "most recent text" & char(13) & "all text from history box", all text from the history box")

  • DLJ Profile Picture
    36 on 25 Dec 2022 at 16:45:47
    Re: Canvas App Comment History

    Update:

    I cracked the blank part. Just need to figure out how to get the last comment o be on top vs below.

     

    If(Not(IsBlank(TextInput1.Text)),ThisItem.'Scheduler Comment'&Char(13)&TextInput1.Text&" -- "&Text(Now()," "&User().FullName&" "& ShortDateTime)&Char(13))

     

    DLJ_0-1671986699127.png

     

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410 Super User 2025 Season 2

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 2

Loading complete