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 / Canvas App Comment His...
Power Apps
Unanswered

Canvas App Comment History

(1) ShareShare
ReportReport
Posted on 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:
I have the same question (0)
  • DLJ Profile Picture
    36 on at

    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

     

  • TBitly Profile Picture
    86 on at

    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")

  • v-qiaqi@microsoft.com Profile Picture
    on at

    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?

     

  • DLJ Profile Picture
    36 on at

    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.

  • Verified answer
    TBitly Profile Picture
    86 on at

    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 at

    @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

     

     

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