Conditional formatting on a list

Copper Contributor

Hi all,

I've got a SharePoint list of which I am looking to setup on conditional formatting on the row if a date and time has passed (i.e 24/03/2021 - 3:00pm, the row to then turn red unless an additional time and date column has data in it). 

 

Would anyone be able to help me with the formatting for this?

Greatly appreciated!

 

1 Reply

@darrenm88 

 

You can achieve this by setting additionalRowClass in view formatting JSON.

Example:

 

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/view-formatting.schema.json",
   "additionalRowClass": "=if([$DueDate] <= @now, 'sp-field-severity--severeWarning', '')"
}

 

Sample Output:

 

listformatting-additionalrowclass

 

You can find more information about view formatting at: Use view formatting to customize SharePoint 


Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.