JOSN formatting to Sharepoint list with group by columns

suresh p 1 Reputation point
2020-08-31T19:04:07.213+00:00

Hi ,
How to set JSON format to sharepoint list view with a group by “status”. Here a condition for each status with a text and colored circle with different color code is presented

21651-image.png

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,145 questions
{count} votes

3 answers

Sort by: Most helpful
  1. MichaelHan-MSFT 18,021 Reputation points
    2020-09-01T10:13:55.027+00:00

    You just need to format the status column. Is it choice column, if so you could format it as below:

    21779-image.png


  2. MichaelHan-MSFT 18,021 Reputation points
    2020-09-04T02:42:18.96+00:00

    Hi @suresh p ,

    By dafault, JSON column formatting cannot refer to the column which is not present in the view. As a workaround, you could use calculated clolumn to achieve this.

    Below is my the example:

    Three column: _Hidden_FlowStatus(Single line of text), color(Single line of text), flow status(Calculated column with formula =IF(1=2,Color,_Hidden_FlowStatus))

    22613-image.png
    22459-image.png

    Hide _Hidden_FlowStatus colmn and color column:
    22460-image.png


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    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.


  3. MichaelHan-MSFT 18,021 Reputation points
    2020-09-07T03:13:58.54+00:00

    Hi @suresh p ,

    You could format the entire row use the rowFormatter or additionalRowClass properties, below is my sample for you:

    {  
      "schema": "https://developer.microsoft.com/json-schemas/sp/view-formatting.schema.json",  
      "additionalRowClass": "='ms-bgColor-'+toLowerCase([$Color])+ ' ms-fontColor-white' "  
    }  
    

    22780-image.png

    Besides, here are samples in the git hub that would help you:

    https://github.com/pnp/sp-dev-list-formatting/tree/master/view-samples
    https://github.com/pnp/sp-dev-list-formatting/tree/master/view-samples/generic-ryg-status-format


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    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.

    0 comments No comments