Forum Discussion
Comment in Microsoft List
Hello MSFT
I have tried many method for the issue I describe above, I now realized that I cannot apply any column formatting to the title column in order to see the comment icon. After I remove the formatting, the comment icon is shown. Can anyone please help about how I can apply formatting and still got the comment icon, even just bold the text.
Also, it seems the comment is not available in the list in Teams
Thanks
Ryan
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
Additional References:
- SharePoint Online: All you need to know about Commenting in Lists
- How to Enable/Disable the commenting in SharePoint Online/Microsoft Lists
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.
- AndrejSramkoJul 21, 2023Copper Contributor
ganeshsanap I have just noticed a small error in the condition that prevents the icon from being hidden. $_CommentCount should be compared to empty string ('')
"=if([$_CommentCount] == '' , 'none' , 'block')"- ganeshsanapJul 24, 2023MVP
AndrejSramko Thanks! Yes, the comparison condition and full example is also available in my article about using List comments count in SharePoint JSON formatting at: Working with SharePoint Online/Microsoft List Comments using JSON Formatting
Please consider giving a Like if my post helped you in any way.
- Webguy06Oct 21, 2024Copper Contributor
ganeshsanapHello
Sorry for my bad English. I'd like to find a way to hilight a field when there is a NEW comment added. I presume this means that there should be a way to note the previous comment as read.
I'm very confused with this and would appreciate some advices.
thanks by advance. Guy
- aykutkaracaFeb 12, 2021Copper Contributor
I am having exactly the same problem. Teams doesnt show the old comments entered using Microsoft Planner/Lists. And now I connected Microsoft Planner/Lists, and my comments from yesterday arent visible either.
- DLutchy365AssistMar 06, 2021Brass ContributorI have just created a List in a Microsoft Teams Channel. The only way to see the comments is to either open the list in Sahrepoint or in the List App (Web).
Is there anyway to see the comments directly from the list in the Teams Channel?- ganeshsanapMar 06, 2021MVP
DLutchy365Assist , aykutkaraca
This is a current limitation of Microsoft lists in Microsoft teams. This will be available in future.
For now, you can follow below workaround:
When you want to add list as a tab in Microsoft Teams, you can add a Website tab rather than Lists tab.
When you use "Website" tab, you need to pass the list URL from browser. Then you can see the list comments in browser tab like:
Read more about list comments feature in below articles:
- All you need to know about Commenting in Lists
- Working with SharePoint Online/Microsoft List Comments using JSON Formatting
- How to Enable/Disable the commenting in SharePoint Online/Microsoft Lists
Please click Mark as Best Response & Like 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.