Modern SharePoint Events: Approval

The Modern SharePoint improvements are exciting, but are also inflexible and can be an awkward layer on top of SharePoint Classic. One such feature that left us wanting more is the Modern Events web part.

Particularly, we needed to apply an approval process and display additional fields in the Modern Events web part. This was accomplished using a separate custom list for event requests, Flow for approvals, and Flow to create a modern Event item.

I hope this post is helpful, but it was written a couple months after the fact. Let me know if you need more details.

Modern Events: Quick Overview

There’s a lot going for the Modern Events web part and its out-of-the-box functionality. Particularly, the design was a long overdue refresh that isn’t as embarrassing as SharePoint Classic’s handling of calendars and event items.

SO NICE to be able to toss in a beautiful events web part

I also really like how the event item could be dressed up with photos and has clean out-of-the-box formatting:

View of an individual event

That being said, it missed two critical features for us: approval functionality and displaying custom fields.

Events Web Part with Custom List Powers!

Want the power of Custom Lists along with the friendly presentation of Modern Event web parts? I wanted to have my cake and eat it, too.

To make this happen, I created a new Custom List for event requests. This list included all the required fields for a modern event item as well as our custom fields.

ColumnTypeReq for Modern Event
TitleSingle line of textYes
EventStartDate and TimeYes
EventEndDate and TimeYes
LocationSingle line of textYes
DescriptionMultiple lines of textYes
NumGuestsSingle line of textNo

Once your custom list is set up with the columns required for modern events and any custom columns, you’re ready to get to the meat and potatoes of this work-around: Flow

The Biggest Flow You’ll Ever Make

Or at least it felt like the biggest flow I’ve ever made.

It starts off simple. The trigger action is “When an item is created”, configured to your custom list for event requests. Here’s my trigger:

Next, you’ll have to do a bit of data normalization / clean up. For example, I had to add steps to localize the EventStart and EventEnd time to our timezone. The localized time is used to send an easy-to-understand Approval request.

Additionally, I had to convert the description field to plain text.

After prepping our data, let’s fire off the Approval process! No surprises here except that we’re using the localized EventStart times and cleaned up data.

Alright, time to collect the responses and use a condition to either publish the approved event request or send a rejection email.

I’ll let you figure out how to handle the rejection logic. Here’s what we do for approved events.

  • First we get the attachments from the Event Request List Item. We iterate over the attachments and build a string with links to where the attachments were uploaded.
  • Next, we create a Modern Event List Item. For the most part, we’re reusing fields from the Event Request Item. For the custom fields, we just concatenate them into the Modern Event List Item’s description field.

Unfortunately, the Modern Event List Item won’t show up just yet. We need to use a custom POST request to modify the Modern Event List Item, particularly the field “fAllDayEvent.” Without this, the Modern Event List Item will not appear for users.

After doing a bit of voodoo magic with the custom POST request, there’s a few more standard actions to update the original event request to be approved, inform the requester, and notify folks about the exciting new event (pictured in the screenshot above).

Woohoo! That’s it. The secret sauce is really with the POST request to make the crossover from a custom list to a Modern Event List.

Leave a Reply

Your email address will not be published. Required fields are marked *