Hi @sl23 ,
To format a column based on its field value, please take a reference to the following JSON example:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"txtContent": "@currentField",
"style": {
"background-color": "=if((@currentField == 'Completed', '#00ff00', if(@currentField == '', '#ff0000', '#DDA0DD')"
}
}
If you want format the color of another column based on the "training" column, please take a reference to the below JSON.
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"txtContent": "@currentField",
"style": {
"background-color": "=if(([$training] == 'Completed', '#00ff00', if([$training] == '', '#ff0000', '#DDA0DD')"
}
}
----------
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
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.