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
- 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
- Nigel WitherdinJan 31, 2018Iron ContributorGood write up on this topic here: https://docs.microsoft.com/en-us/sharepoint/dev/declarative-customization/column-formatting