SOLVED

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

Copper Contributor

Hello,
I have a Sharepoint list that looks like this :

444456464_0-1644833720147.png

 

 

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 :

444456464_1-1644833874764.png

 


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

 

2 Replies
best response confirmed by 444456464 (Copper Contributor)
Solution

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

1 best response

Accepted Solutions
best response confirmed by 444456464 (Copper Contributor)
Solution

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

View solution in original post