SOLVED

Question about the EventDate / StartDate column of the Event Content Type

%3CLINGO-SUB%20id%3D%22lingo-sub-1065520%22%20slang%3D%22en-US%22%3EQuestion%20about%20the%20EventDate%20%2F%20StartDate%20column%20of%20the%20Event%20Content%20Type%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1065520%22%20slang%3D%22en-US%22%3E%3CP%3EI%20need%20to%20display%20a%20list%20of%20events%20using%20custom%20formatting%20(formatting%20view)%20that%20I%20will%20put%20into%20a%20list%20web%20part%20(modern).%20Because%20I%20can't%20refer%20to%20the%20OOB%20events%20calendar%20list%20with%20this%20web%20part%2C%20I've%20created%20a%20new%20custom%20list%20and%20attached%20the%20Event%20content%20type.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20this%20custom%20list%2C%20the%20Start%20Date%20internal%20name%20is%20%22StartDate%22%20and%20the%20GUID%20is%20%7B64cd368d-2f95-4bfc-a1f9-8d4324ecb007%7D.%3C%2FP%3E%3CP%3EHowever%2C%20in%20the%20OOB%20events%20calendar%20list%2C%20the%20Start%20Date%20internal%20name%20is%20%22EventDate%22%20with%20the%20same%20GUID%20as%20%22StartDate%22%20(This%20I%20don't%20understand%20how%20it%20can%20be%20done..).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20issue%20that%20I%20have%20with%20my%20custom%20formatting%20view%20is%20calling%20the%20owssvr.dll%20service%20to%20create%20an%20.ics%20file.%26nbsp%3B%3C%2FP%3E%3CP%3EMy%20start%20date%2Ftime%20info%20is%20not%20correct%20in%20the%20.ics%20file.%20My%20guess%20is%20that%20it%20is%20looking%20for%20the%20%22EventDate%22%20instead%20of%20the%20%22StartDate%22%20(Does%20not%20look%20like%20I%20can%20specify%20the%20start%20and%20end%20date%2Ftime%20when%20calling%20the%20service)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%22href%22%3A%20%22%3D'%40currentWeb'%20%2B%20'%2F_vti_bin%2Fowssvr.dll%3FCS%3D109%26amp%3BCmd%3DDisplay%26amp%3BList%3D%7Bfff74f7d-eb5c-48bc-a83e-4d62854cf8e8%7D%26amp%3BCacheControl%3D1%26amp%3BID%3D'%20%2B%20'%5B%24ID%5D'%20%2B%20'%26amp%3BUsing%3Devent.ics'%22%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20idea%20how%20I%20could%20use%20the%20%22EventDate%22%20in%20my%20custom%20list%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENote%3A%20Here's%20an%20example%3A%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20355px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F161719i82BD7AAA0693B95D%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%222019-12-13%2011_26_14-Calendrier.png%22%20title%3D%222019-12-13%2011_26_14-Calendrier.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1065520%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ELists%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1065761%22%20slang%3D%22en-US%22%3ERe%3A%20Question%20about%20the%20EventDate%20%2F%20StartDate%20column%20of%20the%20Event%20Content%20Type%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1065761%22%20slang%3D%22en-US%22%3EI%20was%20able%20to%20create%20an%20%22EventDate%22%20column%20in%20the%20event%20content%20type%20at%20the%20list%20level.%20However%2C%20if%20I%20try%20to%20hide%20the%20StartDate%20column%20in%20the%20event%20content%20type%2C%20it%20will%20thow%20an%20error%20when%20I%20create%20a%20new%20item.%20So%20I%20just%20let%20it%20optional%20and%20renamed%20the%20StartDate%20column%20to%20%22Other%20Date%22.%20Now%2C%20it%20creates%20the%20.ics%20correctly...%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E
Frequent Contributor

I need to display a list of events using custom formatting (formatting view) that I will put into a list web part (modern). Because I can't refer to the OOB events calendar list with this web part, I've created a new custom list and attached the Event content type.

 

In this custom list, the Start Date internal name is "StartDate" and the GUID is {64cd368d-2f95-4bfc-a1f9-8d4324ecb007}.

However, in the OOB events calendar list, the Start Date internal name is "EventDate" with the same GUID as "StartDate" (This I don't understand how it can be done..).

 

The issue that I have with my custom formatting view is calling the owssvr.dll service to create an .ics file. 

My start date/time info is not correct in the .ics file. My guess is that it is looking for the "EventDate" instead of the "StartDate" (Does not look like I can specify the start and end date/time when calling the service)

 

"href": "='@currentWeb' + '/_vti_bin/owssvr.dll?CS=109&Cmd=Display&List={fff74f7d-eb5c-48bc-a83e-4d62854cf8e8}&CacheControl=1&ID=' + '[$ID]' + '&Using=event.ics'" 

 

Any idea how I could use the "EventDate" in my custom list?

 

Thanks.

 

Note: Here's an example: 

2019-12-13 11_26_14-Calendrier.png

 

 

 

1 Reply
Best Response confirmed by Martin Coupal (Frequent Contributor)
Solution
I was able to create an "EventDate" column in the event content type at the list level. However, if I try to hide the StartDate column in the event content type, it will thow an error when I create a new item. So I just let it optional and renamed the StartDate column to "Other Date". Now, it creates the .ics correctly...