Hi
How can I let the Item() can get the record base on RefID but it show the error: The parameter name RefID is not valid.
The Comments SP list's item ID is not same as the variable "ItemID" but same as RefID. the syntax of Uri and the flow as below.
Anyone know how to do?
Solved! Go to Solution.
Hi @Ed_C,
Yes that should be possible via a REST API call, this time a POST request. Beau Cameron has written a nice blog about this: https://beaucameron.net/2021/01/18/add-comments-to-sharepoint-list-items-using-the-rest-api/
If you want to achieve this via a HTTP action in Power Automate you can use the following setup.
URI
_api/web/lists/getbytitle('@{variables('ListName')}')/items(@{variables('ListItemId')})/Comments()
Headers
{
"accept": "application/json; odata=verbose",
"content-type": "application/json;charset=utf-8"
}
Hi @Ed_C,
Just to double check. You want to collect the comments of a specific list item via the SharePoint REST API, correct?
If so, you could use the following Uri in your Send an HTTP request action:
_api/web/lists/getbytitle('@{variables('ListName')}')/items(@{variables('ListItemId')})/Comments
Yes, but I turn on the versioning,
There has 2 issue I don't know why it happen
1)when I add the attachment with comment it will create 2 version, which make there is an empty string
2)when I remove the attachment with comment it will create 2 version, which make there show 2 same strings
How to fix it in Flow?
_api/web/lists/GetByTitle('Comments')/items(@{variables('CommentListIDByRefID')})/Versions
Hi @Ed_C,
Just to double check. Is your SharePoint List Name Comments or are you talking about the Comments feature? Can you also share a screenshot of the SharePoint list you are trying to interact with?
As far as I am aware Comments don't update the version number of an item in a list. Every time you add a comment nothing will happen to the version number.
See an example below of that. I have enabled versioning on my ListComments list. Added 3 separate comments in a timespan of a couple of seconds and the version of the item number 1 remains at version 1.0.
Oh sorry my description is too unclear let me show you my list.
My list call 'Comments' and the field 'ticketComment' is collecting user comments by versioning control not the list default comment function on SharePoint list
But it may a solution using comment function instead of using versioning. Now, I know how to get the comment right? Is there possible to write the comment through power app?
_api/web/lists/GetByTitle('Comments')/items(@{variables('ListID')})/Comments
Hi @Ed_C,
Yes that should be possible via a REST API call, this time a POST request. Beau Cameron has written a nice blog about this: https://beaucameron.net/2021/01/18/add-comments-to-sharepoint-list-items-using-the-rest-api/
If you want to achieve this via a HTTP action in Power Automate you can use the following setup.
URI
_api/web/lists/getbytitle('@{variables('ListName')}')/items(@{variables('ListItemId')})/Comments()
Headers
{
"accept": "application/json; odata=verbose",
"content-type": "application/json;charset=utf-8"
}
Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!
Power Platform release plan for the 2021 release wave 1 describes all new features releasing from April through September 2021.
User | Count |
---|---|
89 | |
60 | |
42 | |
35 | |
32 |
User | Count |
---|---|
79 | |
67 | |
57 | |
49 | |
42 |