Jan 29 2018 12:25 PM
Hi All,
I am trying to find Json code for SharePoint online 365 columns in a custom list:
If columnX = "no" make the column bold
TIA,
Joe
Jan 29 2018 01:12 PM
Jan 29 2018 01:28 PM
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
Jan 30 2018 08:29 PM
Jan 31 2018 03:38 AM
SolutionHi 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",
""
]
}
}
}
Jan 31 2018 03:37 PM
Jan 31 2018 03:39 PM
Feb 01 2018 05:48 AM
Jan 27 2019 01:44 PM
Rather than making a column bold, you may be able to achieve the same business requirement and draw attention to a value by changing the background color. This can be conditional set based on the value on a record (i.e Yes or No).
More recently, there is also a no-code solution for Choice, Date/Time, and Boolean column types that does not require knowledge of complex JSON to assign background colors.
Jan 28 2019 05:24 AM
Hi @matthew,
That is wonderful!!!
Thank you so much for keeping track of this issue and responding!!
Thanks Agian,
Joe
Apr 24 2020 09:50 AM
Hi There...I know this post is several years old; however, Microsoft has granted your wish WITHOUT JSON CODE! The update is rolling out now and my tenant just got it last week! If you go into the view drop down, and select "Format this view" you will see 2 options. The 2nd option is for conditional formatting. All you have to do is just make sure the column by which you want the rule to run is showing up in the view. From there you can easily say...if this column equals "no" then make the entire row (or a particular column bold, red, italicized...whatever). Good luck and here is a link to the roadmap item
Jan 31 2018 03:38 AM
SolutionHi 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",
""
]
}
}
}