SharePoint List conditional formatting compare columns
Hi,
I have a SharePoint list to manage rental invoices and ensure the amounts on the invoices are the same as they are on the lease agreement.
The invoices are captured in this SharePoint list. I have a lookup column pulling what the amount must be from another list containing the amounts as stated in the lease agreements for each of our leased properties.
So, when entering the amount charged on the invoice, one can see what it should be in another column.
I would like to set up conditional formatting so that the 2 columns are compared and highlighted if there is a difference.
The lookup column is “SiteName:RentPerMonth” and the column to be populated is “Rent”. Both are number columns
I have tried the following in “edit current view”, but I’m probably doing something wrong
{
“$schema”: “https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json”,
“style”: {
“color”: “=if([$Rent] != [$SiteName_x003a_RentPerMonth], ‘green’,’red’)”
}
}
Hi, I have a SharePoint list to manage rental invoices and ensure the amounts on the invoices are the same as they are on the lease agreement. The invoices are captured in this SharePoint list. I have a lookup column pulling what the amount must be from another list containing the amounts as stated in the lease agreements for each of our leased properties.So, when entering the amount charged on the invoice, one can see what it should be in another column.I would like to set up conditional formatting so that the 2 columns are compared and highlighted if there is a difference.The lookup column is “SiteName:RentPerMonth” and the column to be populated is “Rent”. Both are number columns I have tried the following in “edit current view”, but I’m probably doing something wrong {
“$schema”: “https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json”,
“style”: {
“color”: “=if([$Rent] != [$SiteName_x003a_RentPerMonth], ‘green’,’red’)”
}
} Read More