Hi @Sam_01581 ,
Thank you for posting in this community.
Using the following json code, if "ReminderSent" column is blank, and instead display nothing at all.
JSONCopy
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
"elmType": "div",
"attributes": {
"class": "=if(Number([$ReminderSent]) == 0, '',(if((@now - Number([$ReminderSent])) / (1000 * 60 * 60 * 24) >= 7, 'sp-field-severity--blocked', ''))"
},
"style": {
"display": "flex",
"align-items": "center",
"justify-content": "center"
},
"children": [
{
"elmType": "div",
"style": {
"color": "white",
"font-size": "12pt",
"font-weight": "bold",
"padding": "0 4px"
},
"txtContent": "=if(Number([$ReminderSent]) != 0, floor((Number(@now) - Number([$ReminderSent])) / (1000 * 60 * 60 * 24)), ' ')"
}
]
}
Result:
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.