I have a created a column in a SP list and copied some json code to do formatting however it is not working, I'm basically wanting a simple traffic light display.
I am using SP supplied with my Office 365 licence via the web on a Mac Air
I have a created a column in a SP list and copied some json code to do formatting however it is not working, I'm basically wanting a simple traffic light display.
I am using SP supplied with my Office 365 licence via the web on a Mac Air
Julie,
Unfortunately your answer hasn't helped as I do not get the same drop down menu that you have shown when I click on the column that I want to format.
I only get an option to sort the column.
Perhaps I have an old version of SP, I purchased SharePoint Online Plan 1
Regards,
Neville
Julie,
Found the answer, It appears the if you use a predefined list like Tasks supplied with a Project site template there must be some protection on the columns that you create that blocks the formatting capability. I have just created a totally new task list and now have been able to get the Traffic lighting that I wanted working
Thank you for your previous response.
Regards,
Neville
Thank you for your feedback and sharing.
If you find any replies helpful to you, please remember to accept them as answers.
It will help others who meet the similar question in this forum.
Thanks again for your contribution.
Column formatting works well in SharePoint online.
Here is a simple test about changing bg color based on score with column formatting for your reference:

Result:

More information for your reference:
https://docs.microsoft.com/en-us/sharepoint/dev/declarative-customization/column-formatting
If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Julie,
Have sorted this out even further, It appears that column formatting is disabled if you have a list embedded in a web part, as I have created a list with column formatting that works fine when you looking at the various vows created for the list but as soon as you embed the list view in a web part on say another page the formatting disappears.
Regards,
Neville
Julie,
Yes exactly, are there any web part attributes that could stop them appearing?
Regards,
Neville
In order to get a better forum experience, we changed your answer to a comment.
Per my test, the column formatting will still show in the embed list.
Please help clarify your requirements,from your previous post, you said the column formatting disappear in the embed list view, however in the latest comment, you want to stop them appearing.
As far as I known, there are no related web part attributes to avoid showing formatting in embed list view.
Julie,
On further investigation it seems that is more to do with site controls around "Project Site" templates and how the content is managed
It's totally beyond my logical thinking but who ever created the Project site template for SP has done some thing to prevent the column formatting for added columns in the task list from working.
I have also noticed that I cannot select lists from a "Project site" and use them in a " collaboration site" just another Microsoft SP feature I guess.
Regards,
Neville
The project site template is a classic site template in sharepoint online, to format the column in default task list, go to list settings> click the certain column> add json code as following:

As far as I known, there is no OOB way to disable the column formatting for added columns in the task list in project site.
Note: Column formatting currently does not support the following column types :
Filename (in Document Libraries)
Retention Label
Sealed columns
Multi-Line Text column with enhanced rich text
In addition, what do you mean "cannot select lists from a "Project site" and use them in a "collaboration site"?
If possible, you could also provide screenshot for further research.
6 people are following this question.