Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Adding in date / time selection into my form but stopping double bookings

(0) ShareShare
ReportReport
Posted on by

So I have used 

length(body('Get_items')?['value'])
 
In a condition which stops more than 3 people (or how many) booking the room. How would I include the date and time within this condition to stop say 3 people booking on that particular date / time. 
 
Screenshot 2022-09-12 at 1.55.46 PM.png
  • eyau Profile Picture
    107 on at
    Re: Adding in date / time selection into my form but stopping double bookings

    Hi @AB21,

     

    So I don't exactly know what your full flow looks like or where you are referencing your data values, but I created a simple set up based on some assumptions I made from your initial post.

    DateCheckExample1.JPG

    Here's a screenshot of the flow. Basically it's an 'Apply to each' for SharePoint People values within an 'Apply to each' for particular date values (DateArray). This means that for every date, it checks every person's booking date to see if it matches.

     

    With this condition, I increment an integer variable by 1 if the dates match. By doing so, you can check if that number is over 3, meaning that 3 or more people booked that same day.

     

    Now for this flow, I'm not sure where you are referencing these "particular date / times," but just replace my DateArray variable with that content and it should work fine. 

     

    Hope this helps!

     

  • AB21 Profile Picture
    on at
    Re: Adding in date / time selection into my form but stopping double bookings

    Hi @eyau  How would this look? 

  • eyau Profile Picture
    107 on at
    Re: Adding in date / time selection into my form but stopping double bookings

    Hello,

     

    You can add another condition with the "Add" option below your expression to check if there are multiple people booking on that specific date/time. If there is only one date/time to check, then 1 condition would work. However, if you want to check multiple date/times at once, then you have to run an 'Apply to each' for your People values within an 'Apply to each' for your datetime values, running a condition that will check for duplicates. In my experience this process is tedious for Power Automate to process as well as being prone to timing out.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1