Sub groups not showing up in grouping

Boyte, William 20 Reputation points
2024-04-12T10:49:41.2733333+00:00

I have the below code to hide the group count. However, now the sub-group is not showing up and I'm not sure how to fix this.

SubGroup_NotShowing

{

"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/row-formatting.schema.json",

"groupProps": {

"headerFormatter": {

"elmType": "div",

"style": {

"padding-left": "12px",

"font-size": "16px",

"font-weight": "400",

"cursor": "pointer",

"outline": "0px",

"white-space": "nowrap",

"text-overflow": "ellipsis"

},

"children": [

{

"elmType": "div",

"children": [

{

"elmType": "span",

"style": {

"padding": "5px 5px 5px 5px"

},

"txtContent": "@group.fieldData.title"

}

]

}

]

}

}

}

Microsoft 365 and Office | SharePoint | For business | Windows
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. AllenXu-MSFT 24,981 Reputation points Moderator
    2024-04-15T05:48:17.45+00:00

    Hi @Boyte, William,

    Use "txtContent":"@group.fieldData.displayValue" instead of "txtContent":"@group.fieldData.title" in your JSON code.

    As per my test, it successfully hide the count of the group:

    User's image


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.