Forum Discussion

MrDavidGP's avatar
MrDavidGP
Copper Contributor
May 08, 2025
Solved

SharePoint Lists overdue date shade cell

Hi folks,  I'm muddling trough with SharePoint and would love help with something that's been a pain for days!   I have a List for an Issue tracker and a column for "Date reported" what I would lo...
  • Rob_Elliott's avatar
    May 09, 2025

    MrDavidGP​ you can do this with the following JSON:

    {
      "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
      "elmType": "div",
      "txtContent": "@currentField",
      "style": {
        "background-color": "=if(@currentField < @now && @currentField > addDays(@now, -5), 'teal', if(@currentField <= addDays(@now, -5) && @currentField > addDays(@now, -10), 'orange', if(@currentField <= addDays(@now, -10), 'red', 'white')))",
        "color": "=if(@currentField <= addDays(@now, -5) && @currentField > addDays(@now, -10), 'black',  'white')",
        "padding-left": "4px"
      }
    }

     


    Rob
    Los Gallardos
    Microsoft Power Automate Community Super User.
    Principal Consultant, SharePoint and Power Platform WSP Global (and classic 1967 Morris Traveller driver)

     

Resources