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 Terminée choice.

 

Here are all the possible choices in the "Statut" column :

 


But I can't do it. Can you help me please? :c

 

  • 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)

2 Replies

  • RobElliott's avatar
    RobElliott
    Silver Contributor

    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