Need help using JSON to conditional format events in event calendar

Tara Coia 1 Reputation point
2022-04-05T14:51:47.057+00:00

Hello, Many years ago I could have done this with no issue.. but now forgetaboutit....

I am creating a team calendar, using an events list. I would like each Category to display with a different background color. I know I can use JSON.. but I cant seem to get it right, can anyone share their wisdom.. I only need 5 different colors on 5 different terms. Ive been searching for days and cant seem to find anything that will work for me. We are using O365.

Much appreciation for anyone who can help write this darn code.

Thank you so much!

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,073 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Yi Lu_MSFT 17,466 Reputation points
    2022-04-06T12:30:53.707+00:00

    Hi @Tara Coia
    To create color coded events in SharePoint calendar, You could follow the steps below:

    1.Go to List Settings, and click the Category column and create your calendar category values

    2.Create a custom calendar view for each event category. In Calendar tab, go to List Settings, find the list of actual views, click Create a view > Start from an existing view > Calendar.

    In the filter section of the view, configure it to show items only when "Category" is equal to "Whatever you put for your category” and click Save. You’ll need to create a view for each category you want to color code.

    3.Create a blank calendar view to overlay your categories views on its basis. Alternatively, you can modify a default SharePoint calendar instead, set the filter to only show items when "Category" is equal to...and leave the field blank. When you save the view, you should see an empty calendar, assuming you have a category assigned to all the events.

    4.Open the view you created last and set up as default, click Calendar tab and then click Calendar overlays, click New calendar, give your calendar overlay a name (to avoid any confusion, consider naming this to match the name of the category). Select the color and click Resolve button so that the other dropdowns populate with your newly created list views. Repeat this for each category (up to 10 overlays total per calendar).

    For more information, you could refer to:
    https://blog.virtosoftware.com/how-to-color-code-sharepoint-calendars/

    Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    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.