I have a list in SharePoint modern experience, and my customer wants the total count, which appears in parenthesis (), to not display.

I've seen scripts that work for 2013 or 2010, but using the SharePoint Online modern Experience is different.

Any help would be greatly appreciated.

enter image description here

  • Where are you seeing the total count? can you please attach any screenshot if possible? If it is the count of items in list view then you can hide it from list view settings. Commented Feb 10, 2021 at 14:05
  • Thanks for the response! I just edited my post to include a screen shot.
    – Chris
    Commented Feb 10, 2021 at 14:12

1 Answer 1


This is not possible using SharePoint out of the box capabilities as there is no configuration setting to hide the count of grouping.

Documentation: Use grouping to modify a SharePoint view

You will need custom solution for this using SharePoint framework.

One way to achieve this is using Application customizer SPFx extension to inject custom CSS in your modern page and hide the grouping item count.

Reference: Inject Custom CSS on SharePoint Modern Pages using SPFx Extensions

Update from comments:

This is now possible using SharePoint JSON formatting. Try using below JSON code in View formatting settings:

    "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/row-formatting.schema.json",
    "groupProps": {
        "headerFormatter": {
            "elmType": "div",
            "txtContent": "@group.fieldData"
  • That’s the kind of information I’ve read. Thank you for your response. Unfortunately I’m not the site owner, just a contractor working on this specific list. I’m not sure what a SharePoint framework is. They said I should use their “Modern Script Editor”. Just to test, I temporarily switched the list to classic view, and the JavaScript I wrote worked perfectly. The script doesn’t seem to work in this Modern Script Editor...which I’ve never heard of.
    – Chris
    Commented Apr 12, 2021 at 13:46
  • 1
    This is now possible with JSON formatting. Check [this(docs.microsoft.com/en-us/sharepoint/dev/… Commented Apr 12, 2021 at 14:10
  • Ganesh, this is great news. Thank you. So I’ll be able to hide the group by number counts in ( ) in a modern view with this? Could I also hide the column headers? Also, I hate to be a bother and sound too much like a novice, but could you please tell me what I would write to accomplish this? Again, thank you so much.
    – Chris
    Commented Apr 12, 2021 at 14:30
  • You need to customize list view using JSON formatting capabilities of SharePoint. You can hide the count as well as you can format group headers conditionally to apply colors, icons & much more. Check the examples given in documentation. Commented Apr 12, 2021 at 15:20
  • Thanks again, Ganesh. This GroupBy list doesn't have any headers above, just an arrow, column header, colon, then the FAQ question. For example: >Question: How Do I Check Out Books? (1) When clicked it drops down to reveal the answer. But I'm trying to get rid of the "Question:" and the (1). The list you sent is comprehensive with a lot of good information, but I can't find anything specific about my issue.
    – Chris
    Commented Apr 12, 2021 at 17:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.