Forum Discussion
Color Entire Row of List Based on Status Column Content
I have been tasked with determining whether there is a way to turn an entire row a given color based on the content of the 'Status' column.
In the example the 'Status' column has a Conditional Formatting rule. Is there a way to extend the rule to the entire line item?
Phishdawg format your view with the following JSON:
{ "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/row-formatting.schema.json", "additionalRowClass": "=if([$Status] == 'Underway', 'sp-css-backgroundColor-BgCornflowerBlue', if([$Status] == 'Pending', 'sp-css-backgroundColor-BgGold', 'sp-css-backgroundColor-BgMintGreen'))" }which gives the following result:
Rob
Los Gallardos
Microsoft Power Automate Community Super User.
Principal Consultant, SharePoint and Power Platform WSP Global (and classic 1967 Morris Traveller driver)
1 Reply
- Rob_ElliottSilver Contributor
Phishdawg format your view with the following JSON:
{ "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/row-formatting.schema.json", "additionalRowClass": "=if([$Status] == 'Underway', 'sp-css-backgroundColor-BgCornflowerBlue', if([$Status] == 'Pending', 'sp-css-backgroundColor-BgGold', 'sp-css-backgroundColor-BgMintGreen'))" }which gives the following result:
Rob
Los Gallardos
Microsoft Power Automate Community Super User.
Principal Consultant, SharePoint and Power Platform WSP Global (and classic 1967 Morris Traveller driver)