cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

Comments History

Hi All,

 

I have a requirement where in I am using Multiline Text Column with Append changes. My data source is sharepoint. 
in my PowerApps, I want to show the history of comments that has been added into the column. 
How can I achieve this?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

@Jayant2 
Suppose you want to leave a comments history that looks like this:

 

 

MDEVANEY - 10/12/2020 8:00 AM - I like this list item

 

MDEVANEY - 10/12/2020 9:30 AM  - Very interesting find

MDEVANEY - 10/12/2020 10:00 AM - Is this right?

 

 

To do this create a multi-line text column in SharePoint called 'Comments'.  Then add an Edit Form that includes the comments field.  Add a 2nd text input field to the Comments card called TextInput_NewComments.Text.  This is where you will type new comments.

 

Next, replace the Default property of the comments Text Input Card with this code.  When you type in a new comment it will be added to the previous comments.

 

If(
    Form1.FormMode=FormMode.Edit,
    ThisItem.Comments & User().FullName & " - " & Now() & " - " & TextInput_Comments.Text & Char(10) & Char(10),
    ThisItem.Comments
)

 

Write your newly typed comment into the form and submit it using this code in the OnSelect property of a button

SubmitForm(Form1)

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

4 REPLIES 4
Highlighted
Super User II
Super User II

@Jayant2 

 

I do not recommend using Multiline Text field with Append Changes as there is no way to show Append Changes (OR) History comments in the Power Apps.

 

Reference: https://powerusers.microsoft.com/t5/Building-Power-Apps/Listing-Appended-Changes-from-Sharepoint-Lis...

 

Workaround:

Create two SharePoint fields - One field is Single line of Text for Comments (CommentsField) , second one is Multi line of Text field without Append changes (CommentsHistory).

 

In the Power Apps, show CommentsField as editable field to the user and CommentsHistory as Read Only field in View Mode of the item.

 

In the CommentsHistory update property, you can set the value as tbCommentsField.Text & ThisItem.CommentsHistory. 

 

 

With this, you can append your comments to the History. 

 

Regards

Krishna Rachakonda

If this reply helped you to solve the issue, please mark the post as Accepted SolutionMarking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.
Highlighted
Resolver V
Resolver V

Hi,

 

I ran into this before and actually did something to make it even better

 

Created a SharePoint List called Blah, Blah, Notes...

 

Then linked the record ID for the main thing you are commenting or taking notes on.

 

Then added a form and a gallery to the screen.

 

Then just link it all up.

 

I also added User, Locations, Weather, etc.. to capture who, what when where of comments.

 

 

Highlighted
Super User III
Super User III

@Jayant2 
Suppose you want to leave a comments history that looks like this:

 

 

MDEVANEY - 10/12/2020 8:00 AM - I like this list item

 

MDEVANEY - 10/12/2020 9:30 AM  - Very interesting find

MDEVANEY - 10/12/2020 10:00 AM - Is this right?

 

 

To do this create a multi-line text column in SharePoint called 'Comments'.  Then add an Edit Form that includes the comments field.  Add a 2nd text input field to the Comments card called TextInput_NewComments.Text.  This is where you will type new comments.

 

Next, replace the Default property of the comments Text Input Card with this code.  When you type in a new comment it will be added to the previous comments.

 

If(
    Form1.FormMode=FormMode.Edit,
    ThisItem.Comments & User().FullName & " - " & Now() & " - " & TextInput_Comments.Text & Char(10) & Char(10),
    ThisItem.Comments
)

 

Write your newly typed comment into the form and submit it using this code in the OnSelect property of a button

SubmitForm(Form1)

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

Highlighted

@mdevaney i tired your solution and it worked good. However, how do i make the last appended text as the first one in the comment box.

 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (8,686)