Forum Discussion
List Style in Modern experience not working
- Dec 11, 2019
yuyitax sorry the JSON code got changed during the copy and paste, hopefully now corrected. The code is:
{
"$schema":
"https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
"elmType": "div",
"debugMode": true,
"txtContent": "@currentField",
"style": {
"color": "#0000ff"
}
}Rob
Los Gallardos
Microsoft Power Automate Community Super User
Hi yuyitax lists in the modern experience are formatted in a different way to classic lists. For some column types you can select the formatting. Click on the dropdown arrow next to the column, select Column settings and then click Format this column
To do something like setting the text color for a particular column you'd do the same:
but then in the in the format box that appears on the right you'd enter (or copy/paste) JSON code:
I set the color of the "County" column to a shade of blue and the JSON syntax for that was:
{
"$schema":
"https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
"elmType": "div",
"debugMode": true,
"txtContent": "@currentField",
"style": {
"color": "#0000ff"
}
}
The formatting of modern lists is more powerful than on classic lists and allows you to add, for example, buttons to trigger a flow and do other actions:
Rob
Los Gallardos
Microsoft Power Automate Community Super User
- yuyitaxDec 11, 2019Copper Contributor
Hi Rob,
Thank you for your fast help. I tried using the blue shade code that you share but i get an error that says to use a valid column-formatting JSON. Any idea why?
- RobElliottDec 11, 2019Silver Contributor
yuyitax sorry the JSON code got changed during the copy and paste, hopefully now corrected. The code is:
{
"$schema":
"https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
"elmType": "div",
"debugMode": true,
"txtContent": "@currentField",
"style": {
"color": "#0000ff"
}
}Rob
Los Gallardos
Microsoft Power Automate Community Super User- yuyitaxDec 11, 2019Copper Contributor
Thank you Rob that did fix the link coloring, but now they are not clickable, meaning they do not link to their corresponding list item.