Nov 03 2020 05:29 AM
Hello MSFT
Today, I found that I am now able add comment in Microsoft list for one of my list. However, I am finding some issues:
1. After a comment is added, I dont see any icon on the quick view for the list item with comments. This is different from MSFT demo, there is no way for us to know which item has comment until we open one by one. -- Update on 11/3, however after I remove the column formatting on the title column, the comment icon is shown. Is there any way we can apply some sort of formatting, even just bold the text.
2. the comment is not viewable in Microsoft list in Teams.
Pls help
Thanks
Ryan
Dec 28 2020 11:28 AM
@Jin Chen I'm trying to figure out how to get the comments in Teams as well. I'd like the users to be able to create and read comments without leaving the lists in Teams. Have you received any feedback or have any learnings you would be willing to pass along?
Jan 03 2021 05:45 AM
Try using below JSON code. It will bold the title text and show comments icon if there are any comments added.
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
"elmType": "div",
"attributes": {
"class": "ms-fontColor-themePrimary ms-fontSize-m"
},
"children": [
{
"elmType": "span",
"txtContent": "@currentField",
"style": {
"font-weight": "bold"
}
},
{
"elmType": "span",
"style": {
"font-size": "16px",
"margin-left": "10px",
"display": "=if([$_CommentCount] == '0' , 'none' , 'block')"
},
"attributes": {
"iconName": "Comment"
}
}
]
}
Microsoft documentation: Use column formatting to customize SharePoint
Please click Mark as Best Response if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
Jan 04 2021 09:16 AM
@ganeshsanap thank you for the code. It did change the format and add the icon, but there was no action when it was clicked. With a double click, it opened the custom form.
I was hoping to have the "add comment" feature in the Teams view so users wouldn't have to open SharePoint
Is that possible?
Jan 05 2021 02:56 AM
@MistyHill I don't think currently it is possible to add comments in lists from Microsoft teams. Also, not possible to open comments pane by using JSON formatting. If you open the list form you can see the comments pane.
Note from Microsoft:
Please click Mark as Best Response if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.