sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

How to format a Group By view

Open DeepReef11 opened this issue 7 years ago • 4 comments

I could not find a way to format the Group By view.

I could not find a way to get values from previous/next rows to make my own Group By either.

For example, it doesn't seems possible to go from this:

image

to the following grouped format:

image

This is the default available formating for a group by:

image

Edit: (Remade the last screenshot to be more like my examples)

Available formating for a group by: image

Originally posted by @jogood in https://github.com/SharePoint/sp-dev-docs/issues/3495#issuecomment-549501487

DeepReef11 avatar Nov 05 '19 21:11 DeepReef11

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

msft-github-bot avatar Nov 05 '19 21:11 msft-github-bot

This is not currently supported in the JSON schema. I would also appreciate adding the ability to modify / style group headings.

gobigfoot avatar Nov 07 '19 15:11 gobigfoot

As a workaround, we can use column formatting to achieve it.

Example:

Create a custom list "TestList", add new field "Value". Group by the default "Title" field.

Formatting "Title" column using the JSON below.

{
   "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
   "elmType": "div",
   "txtContent": "[$Value]"
}

Formatting "Value" column using the JSON below.

{
   "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
   "elmType": "div",
   "txtContent": ""
}

The result:

Capture

Dennis Guo Microsoft SharePoint Community Support

Dennis-LZ avatar Nov 08 '19 09:11 Dennis-LZ

Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues

msft-github-bot avatar Jan 23 '20 06:01 msft-github-bot