Forum Discussion

444456464's avatar
444456464
Copper Contributor
Feb 14, 2022
Solved

Make a date appear red in one column based on another column

Hello, I have a Sharepoint list that looks like this :     I would like to make the date of the "Livraison" column appear in red if the date has passed and the "Statut" column is not on the...
  • RobElliott's avatar
    Feb 14, 2022

    444456464 format the Livraison column with:

    {
      "$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
      "elmType": "div",
      "txtContent": "@currentField",
      "style": {
        "color": "=if(@currentField < @now && [$Statut] != 'Terminée', '#ff3939','')"
      }
    }

     

    Rob
    Los Gallardos
    Intranet, SharePoint and Power Platform Manager (and classic 1967 Morris Traveller driver)

Resources