question

MeagLane-4802 avatar image
0 Votes"
MeagLane-4802 asked BWillbanks-8124 commented

Sharepoint Calendar JSON

Is there a JSON formula I can use to color the text of a choice fiend in a calendar list?

Example: I have a choice column with the options EROC or AROC - I would like EROC to be green text and AROC to be blue text on the calendar. What would the JSON be for that?

Thank you!

115388-json.jpg115463-json.jpg


office-sharepoint-online
json.jpg (44.1 KiB)
json.jpg (44.1 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.

1 Answer

EchoDu-MSFT avatar image
0 Votes"
EchoDu-MSFT answered BWillbanks-8124 commented

Hello @meaglane-4802 ,

Welcome to Q&A Forum!

According to my research and search, We cannot set JSON formatting for Choice column in a Calendar list.
However, you could try to the below workaround:

Adding Colors to Event Categories with Overlay Feature:

1.Create a Choice column naemd "Types" and set it as the required field.

115776-11.png

2.Create three Calendar Views

115765-21.png

ALL view:

  • Make this view the default and public view

  • Filter: Title is equal to null(empty)

115759-22.png

EROC view:

  • Make this view the public view

  • Filter: Types is equal to EROC

115699-23.png

AROC view:

  • Make this view the public view

  • Filter: Types is equal to AROC

115766-24.png

3.Go to the Calendar list, on the CALENDAR tab, click on Calendars Overlay.

115740-31.png

4.On the Calendar Overlay Settings page, click on New Calendar to create two calendars

115747-41.png

EROC:

  • Please click "Resolve" button, and select the corresponding list and list view

  • Select the "Always show" checkbox.

115791-42.png

AROC:

  • Please click "Resolve" button, and select the corresponding list and list view

  • Select the "Always show" checkbox.

115760-43.png

5.Go to the Calendar list, you will see as below:

115748-5.png

Thanks,
Echo Du
================================
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.





11.png (78.0 KiB)
21.png (59.5 KiB)
22.png (68.3 KiB)
23.png (63.7 KiB)
24.png (63.9 KiB)
31.png (31.8 KiB)
41.png (17.6 KiB)
42.png (37.6 KiB)
43.png (37.7 KiB)
5.png (37.0 KiB)
· 2
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.

Hi @meaglane-4802 ,

Is there anything else I can help with regarding this issue?
You can comment us at any time and we will continue to follow up.

Thanks,
Echo Du

0 Votes 0 ·

Hi @EchoDu-MSFT ,

I ran into a problem when following the steps above. I need to use it for 6 different types instead of 2 which I see not being a huge deal, but when I add a new event it creates one for each type. I also have gone into each calendar view and try to add an event for that specific type, but I still get the same problem when I view all.




130042-calendar.jpg


0 Votes 0 ·
calendar.jpg (64.6 KiB)