Forum Discussion

Jedd_Kulis's avatar
Jedd_Kulis
Copper Contributor
Jul 06, 2022
Solved

Conditional formatting - automatic change of another column

Hi there,   I have created a Sharepoint list, which is mostly used to monitor insurance policies to make sure they're up to date. I want to conditionally format the following columns:      ...
  • RobElliott's avatar
    Jul 06, 2022

    Jedd_Kulis don't forget this only changes the formatting, it doesn't change the underlying data.

     

    {
      "$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
      "elmType": "div",
      "txtContent": "=if([$InsuranceExpiryDate]>@now, @currentField, 'Expired')",
      "style": {
        "background-color": "=if([$InsuranceExpiryDate] > @now, 'teal', '#c00000')",
        "color": "white"
      }
    }

     


     

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