question

NevilleKent-9609 avatar image
0 Votes"
NevilleKent-9609 asked JoyZ commented

Does column formatting work for microsoft365 sharepoint

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

office-sharepoint-online
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

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

0 Votes 0 ·
NevilleKent-5078 avatar image
0 Votes"
NevilleKent-5078 answered JoyZ commented

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

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@NevilleKent-9609,

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.

0 Votes 0 ·
JoyZ avatar image
1 Vote"
JoyZ answered

@NevilleKent-9609,

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:

94732-image.png

Result:

94753-image.png

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.



image.png (69.7 KiB)
image.png (45.9 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

NevilleKent-9609 avatar image
0 Votes"
NevilleKent-9609 answered JoyZ commented

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

· 5
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@NevilleKent-9609,

Do you mean embed the list to another page?

95483-image.png


0 Votes 0 ·
image.png (84.4 KiB)

Julie,
Yes exactly, are there any web part attributes that could stop them appearing?
Regards,
Neville

0 Votes 0 ·
JoyZ avatar image JoyZ NevilleKent-9609 ·

@NevilleKent-9609,

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.

0 Votes 0 ·

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

0 Votes 0 ·
JoyZ avatar image JoyZ NevilleKent-9609 ·

@NevilleKent-9609,

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:

96321-image.png

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 :

  1. Filename (in Document Libraries)

  2. Retention Label

  3. Sealed columns

  4. 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.





0 Votes 0 ·
image.png (39.4 KiB)