Forum Discussion

DevHuws's avatar
DevHuws
Copper Contributor
Jun 25, 2021
Solved

Sharepoint List Column Formatting

Hello everyone. I have a Sharepoint Online list with various different fields holding contract information. Each row contains several date fields formatted dd/mm/yyyy. I want every row that has an ex...
  • ganeshsanap's avatar
    ganeshsanap
    Jun 28, 2021

    DevHuws Not sure if I understood it correctly. But, either of below JSON codes should work for you: 

     

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

     

    OR 

     

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

     


    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.