Forum Discussion
Sharepoint Conditional Formatting
- Jan 31, 2018
Hi Nigel,
Yes a small bit of Json in the column formatting does the trick :)
Below is an example, @faustocapellanjr sent me...
Thanks again for your help.
Joe
{
"$schema": "http://columnformatting.sharepointpnp.com/columnFormattingSchema.json",
"txtContent": "@currentField",
"elmType": "div",
"style": {
"font-weight": {
"operator": "?",
"operands": [
{
"operator": "==",
"operands": [
"@currentField",
"No"
]
},
"bold",
""
]
}
}
}
Thanks Nigel,
I will look into that. I didnt expect it to be so complex. I figured I could just add some Json Code in the coumn Formatting in the column settings.
Thanks again,
Joe
- Nigel WitherdinJan 31, 2018Iron ContributorIt might be possible to do something with the Column Formatting (Ive never really used it) but the Field Customizer is probably the best way to customize the rendering of any field, and be confident that it will work in Modern SharePoint pages
- Joe FischerJan 31, 2018Brass Contributor
Hi Nigel,
Yes a small bit of Json in the column formatting does the trick :)
Below is an example, @faustocapellanjr sent me...
Thanks again for your help.
Joe
{
"$schema": "http://columnformatting.sharepointpnp.com/columnFormattingSchema.json",
"txtContent": "@currentField",
"elmType": "div",
"style": {
"font-weight": {
"operator": "?",
"operands": [
{
"operator": "==",
"operands": [
"@currentField",
"No"
]
},
"bold",
""
]
}
}
}- Nigel WitherdinJan 31, 2018Iron Contributornice one! Will have to look into what you can do with column formatting a little more