Forum Discussion

DWOps's avatar
DWOps
Copper Contributor
Aug 04, 2023

Conditional formatting for dates based on another cell value

Hi, I am trying to add conditional formatting to my sharepoint list but cant figure out the answer for my scenario.    I want to change the rows to orange if the column 'Status' shows "Awaiting Pay...
  • ganeshsanap's avatar
    Aug 07, 2023

    DWOps Use this JSON for your list view formatting

     

     

    {
      "$schema": "https://developer.microsoft.com/json-schemas/sp/view-formatting.schema.json",
      "additionalRowClass": "=if([$Status] == 'Awaiting Payment', if(@now >= addDays([$DateBillSent],60),'sp-field-severity--severeWarning',if(@now > addDays([$DateBillSent],30) && @now < addDays([$DateBillSent],60),'sp-field-severity--warning50','')), '')"
    }

     

     

    Where Status and DateBillSent are internal names of your status and date columns. You can get the internal name of your column by following this article: How to find the Internal name of columns in SharePoint Online? 

     

    Output


    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.

Resources