Forum Discussion
Column formatting now rolling out to first release users
this is just what ive been waiting for, i tried pasting / editing the json code in the appropriate place but it doesnt work, is it not up and running yet ?, is it possible our sys admin have blocked anything?
- LincolnDeMarisNov 22, 2017
Microsoft
This feature is fully rolled out and to our knowledge, there's no way to block the functionality. Can you message me the JSON that you're trying that's not working? Are ALL samples that you've tried not working?
- Stephen WALKERNov 23, 2017Copper Contributor
below is the json im using, it does work (but not when I switch to classic sharepoint (lol), can you tell me how to alter this code snippet so that the cells background is red with white text in bold
{
"elmType": "div",
"txtContent": "@currentField",
"style": {
"background-color": {
"operator": "?",
"operands": [
{
"operator": "<=",
"operands": [
"[$Alert_x0020_date]",
"@now"
]
},
"#ff0000",
""
]
}
}
}- LincolnDeMarisNov 27, 2017
Microsoft
Column formatting only works in modern.
Try this JSON.
{
"elmType": "div",
"txtContent": "@currentField",
"style": {
"background-color": {
"operator": "?",
"operands": [
{
"operator": "==",
"operands": [
"[$Alert_x0020_date]",
"@now"
]
},
"#ff0000",
""
]
},
"color": {
"operator": "?",
"operands": [
{
"operator": "==",
"operands": [
"[$Alert_x0020_date]",
"@now"
]
},
"#ffffff",
""
]
}
}
}