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?
Solved! Go to Solution.
@Anonymous
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."
@Anonymous
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.
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 Solution. Marking 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. |
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.
@Anonymous
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."
@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.
@mdevaney I wonder if you can help me get your formula in to mine, below is what I have for my comments.
I wanted to post even though one asked about this 8 months ago, but would rather share with the community for when others come to this post they can know the resolution too. With help from my teammate Divya the solution to make the last appended text as the first on in the comment box is quite simple. Here is the following adjustment to @mdevaney function:
If(
Form1.FormMode=FormMode.Edit,
User().FullName & " - " & Now() & " - " & TextInput_Comments.Text & Char(10) & Char(10) &
ThisItem.Comments,
ThisItem.Comments
)
DataCardValue63.Selected.Value &"-"& varDate &Char(10)&Char(10)& DataCardValue63.Selected.Value &"-"& varDate
comment box : showing same repeated but not showing last changed value
Not started-10/112021
Not started-10/112021
@Ungarala1 just spotted this. Not sure if you have solved your possible issue or if you was posing a question for help with the function you provided or not. If you was from what I see is you don't have a second control listed where you are writing it too. If you look at what Matt Devaney provided:
If( Form1.FormMode=FormMode.Edit, ThisItem.Comments & User().FullName & " - " & Now() & " - " & TextInput_Comments.Text & Char(10) & Char(10), ThisItem.Comments )
You will see he has twice ThisItem.Comments but the other Card/Control is TextInput_Comments.Text.
Let us know if was able to resolve if this was a question or an issue. Thank you
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
189 | |
56 | |
49 | |
37 | |
36 |
User | Count |
---|---|
270 | |
87 | |
80 | |
76 | |
74 |