How to change background of the list items base on another column in SharePoint Online

Andy 1,346 Reputation points
2022-02-22T06:01:35.307+00:00

I have a Custom List in SharePoint Online. I need change the background of the list items base on "Status" column.

Can anybody help me with it?

176616-20220222135537.png

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

Accepted answer
  1. Emily Du-MSFT 43,331 Reputation points Microsoft Vendor
    2022-02-22T08:52:47.103+00:00

    @Andy

    Here're steps:

    1.Click All Items -> Format current view -> Advanced mode.

    176747-1.png

    176762-2.png
    2.Add following codes.
    {
    "$schema": "https://developer.microsoft.com/json-schemas/sp/view-formatting.schema.json",
    "additionalRowClass": "=if([$Status] == 'open', 'sp-field-severity--good', 'sp-field-severity--blocked')"
    }

    176748-3.png
    3.Result.

    176669-4.png


    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.


0 additional answers

Sort by: Most helpful