Forum Discussion

YueZhao08's avatar
YueZhao08
Copper Contributor
Oct 25, 2024

SharePoint List Calendar View JSON formatting

I have a SharePoint list with column "person" and "categorie". If I use column formatting with JSON, it works. I can show person + categorie in column title in list view. But if I change to calendar view, the info will not been displayed. How can i put the JSON in calendar view? I don't want to use power automate to copy the person value to text column, because we have this calendar in many SharePoint teamsite. I don't want to create hundert flows to do that.

 

columns of my SharePoint list:

- title: (text) always empty

- person: (person and group)

- categorie: (chioce)

- from: (date)

- to: (date)

 

JSON script:

{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"txtContent": "=[$person.title] + ' ' + [$categorie]"
}

  • YueZhao08 Unfortunately I don't think this is yet possible to do in the calendar formatting. I would have suggested using a calculated column, as a workaround, but they don't support the use of a Person columns. So I think Power Automate is the only way, if you want to show two columns in a month view. 

     

    However Week/Work Week/Day views do support showing two fields, so perhaps that's the best solution:

     

    Otherwise I would show the "person" field and (sort of) show categorie by using it as a color formatter in the view.

     

  • YueZhao08 Unfortunately I don't think this is yet possible to do in the calendar formatting. I would have suggested using a calculated column, as a workaround, but they don't support the use of a Person columns. So I think Power Automate is the only way, if you want to show two columns in a month view. 

     

    However Week/Work Week/Day views do support showing two fields, so perhaps that's the best solution:

     

    Otherwise I would show the "person" field and (sort of) show categorie by using it as a color formatter in the view.

     

Resources