We could use the [$FieldName]
syntax to look at the value inside another field in column formatting.
FieldName is assumed to be the internal name of the field.
Simple test for your reference:
- Find the internal name of another field via list settings>click on the specified column under Columns option, check the url of the column to get the internal name:
- Format the "Completion date" column as shown below:
Code:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
"elmType": "div",
"txtContent": "@currentField",
"attributes": {
"class": "=if(@currentField >= [$Duedate], 'ms-fontColor-orange ms-fontWeight-bold', '')"
}
}
More information for your reference:
If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.