List Grouping

Copper Contributor

Hello! I truly appreciate all assistance

 

I have a list that is grouping my division name and then status, but I cannot get the header columns to be hidden.

bryanfrumkin47_0-1707772294878.png

bryanfrumkin47_1-1707772327448.png

Here is my view formatting JSON:

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/row-formatting.schema.json",
  "groupProps": {
    "hideFooter": false,
    "headerFormatter": {
      "elmType": "div",
      "style": {
        "flex-wrap": "wrap",
        "display": "flex",
        "box-sizing": "border-box",
        "padding": "4px 8px 5px 8px",
        "border-radius": "6px",
        "align-items": "center",
        "white-space": "nowrap",
        "overflow": "hidden",
        "margin": "1px 4px 4px 1px"
      },
      "children": [
        {
          "elmType": "div",
          "style": {
            "display": "flex",
            "flex-direction": "row",
            "justify-content": "center"
          },
          "children": [
            {
              "elmType": "div",
              "txtContent": "= @group.fieldData.displayValue",
              "style": {
                "padding": "5px 5px 5px 5px",
                "font-weight": "500",
                "color": "=if(@group.fieldData.displayValue == 'Business Cards', '#8B4513', if(@group.fieldData.displayValue == 'Name Badge', '#FF6F61', if(@group.fieldData.displayValue == 'General Supplies', '#9400D3', 'DefaultColor')))"
              }
            },
            {
              "elmType": "div",
              "attributes": {
                "class": "=if(@group.fieldData.displayValue == 'Business Cards', 'ms-Icon--IDBadge', if(@group.fieldData.displayValue == 'Name Badge', 'ms-Icon--IDBadge', if(@group.fieldData.displayValue == 'General Supplies', 'ms-Icon--Box', '')))"
              },
              "style": {
                "font-size": "16px",
                "padding-left": "5px"
              }
            }
          ]
        }
      ]
    }
  }
}

 

Please let me know if you have any questions or concerns.

4 Replies

@bryanfrumkin47 you've grouped the list on the All items view. So create a new view with only the columns(s) you want to display and apply the JSON grouping formatting to that view.

 

View with all columns (not the All items view which I keep for a normal view of the list):

1-AllColumns.png

 

View with Just 2 columns:

 

2-SectionTitleOnly.png

 

Rob
Los Gallardos
Microsoft Power Automate Community Super User.
Principal Consultant, SharePoint and Power Platform WSP Global (and classic 1967 Morris Traveller driver)

@Rob_Elliott 

Hey Rob, 
I created a new view, but when I open up the grouping, the status and division name reappear.

bryanfrumkin47_0-1708631757163.png

bryanfrumkin47_1-1708631813359.png

Is it a bug causing this to happen because I was definitely able to hide these columns in the past

Go into list settings, select the view and remove the columns from there and save.

@Rob_Elliott 

bryanfrumkin47_0-1708719014068.pngbryanfrumkin47_1-1708719033427.png

Then I go back to the list, and they don't show

bryanfrumkin47_2-1708719079016.png

Until, I open up the list groupings

bryanfrumkin47_3-1708719113474.png


Please let me know if you have any questions or concerns.