Power Automate: Course Booking

Was doing a bit more playing with Power Automate again recently and thought I would share.

This time I was looking at finding a way where staff could book on an internal training course but where there would be a maximum number of places available.

My solution involves a Form to submit requests, a PowerAutomate to manage the requests and check if a given session has capacity and a SharePoint list to store the submitted request details for those people who successfully book a place.

So the steps:

  1. Create a form for your staff to make their training request
  2. Create a SharePoint list which will store the accepted requests;   The list should contain fields matching the questions within you form.
  3. Create the PowerAutomate to manage the submitted requests including emailing confirmations and apologies dependent on if the course is full or not.

Now I am going to detail point 3 above, as the other points are reasonably straight forward to achieve.

One of the first things we need to do is to Initialise a new variable which will be used to store the count of the number of people already booked on a course.    This should be an integer variable and set initially to 0.   Within the PowerAutomate we will change the value later based on the number of records in the SharePoint list.

Next I am using a Get Items action to get all of the items from the SharePoint list.   This will get you all the records submitted so far which is basically a list and count of the number of people already booked on the course.   

We now need to set the variable so that it stores the count of the number of records already in the SharePoint list.   To do this use a Set Variable action.    Within the value of this action we want to use an expression using the expression below:

length(body(‘GetItems‘)?[‘value’])

Note GetItems should be the name of the Get Items action mentioned earlier.    This expression will basically count the number of records in the SharePoint list as accessed via the earlier Get Items action.   

From here it is simply a case of using a Condition to check if the variable is less than or equal to you maximum number of attendees, and then send out appropriate emails either acknowledging acceptance on the course or indicated that the course is currently full.

And so, we have a basic little CPD course booking process complete with maximum number of attendees and confirmation emails.

Advertisement

Author: garyhenderson2014

Gary Henderson is currently the Director of IT in an Independent school in the UK. Prior to this he worked as the Head of Learning Technologies working with public and private schools across the Middle East. This includes leading the planning and development of IT within a number of new schools opening in the UAE. As a trained teacher with over 15 years working in education his experience includes UK state secondary schools, further education and higher education, as well as experience of various international schools teaching various curricula. This has led him to present at a number of educational conferences in the UK and Middle East.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: