web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Desk booking: How to r...
Power Apps
Unanswered

Desk booking: How to reset the booked desks based on the Time?

(0) ShareShare
ReportReport
Posted on by 20

Hi All

 

I am creating a desk booking app, I am facing a challenge here how to reset the booked desks/spaces based on time.

Example:

            current date booked one desk 06:00PM to 07:00 PM Space92 for next user the same desk/space will be available same day after 07:00 PM how to achieve this .

Below Logic I am using it to show the desks while booking a new desk/space

 

 

Filter( 
 'Desks List', 
 Not( 
 Title in Filter( 
 'Desks Reservations List', 
 'Check Out From' >= startTime && 'Check Out To' <= endTime || 'Check Out From' <= endTime && 'Check Out To' >= endTime 
 ).DeskText 
 ) && Active = 1 

) 

 

 

 

Below are the Sharepoint list snaps

RajendraRaju_k_0-1655191890188.png

RajendraRaju_k_1-1655191999235.png

Thanks in Advanced

 

 

Categories:
  • WarrenBelz Profile Picture
    156,940 Most Valuable Professional on at

    Hi @RajendraRaju_k ,

    I assume you are using the template here (this code is posted a lot and has errors). The below should be clode to what you want assuming a booking can end at the same time another can start.

    Filter( 
     'Desks List', 
     !( 
     Title in 
     Filter( 
     'Desks Reservations List', 
     (
     'Check Out From' >= startTime && 
     'Check Out From' < endTime
     ) || 
     (
     'Check Out To' > startTime && 
     'Check Out To' <= endTime 
     )
     ).DeskText 
     ) && Active = 1 
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

     

  • RajendraRaju_k Profile Picture
    20 on at

    Hi @WarrenBelz ,

     

    Thanks for the quick response.

    I have tried what you have shared the code but same desk/space showing already booked time slot also below are snapshot for your reference.

    Booked Desk/space:

    RajendraRaju_k_2-1655194634075.png

     

     

     

    when user booking new desk same time same desk/space will not show.

     

    RajendraRaju_k_1-1655194571426.png

     

    Ex:02:00PM to 04:00PM desk space 91 Already booked right if the user selected time 04:00PM to 05:00PM then this desk/space will be visible and available for user to book.

    How to do this?

     

    Thank you

     

     

  • WarrenBelz Profile Picture
    156,940 Most Valuable Professional on at

    @RajendraRaju_k ,

    I simply corrected your code syntax to filter the content to exclude items where: - 

    • Either the 'Check Out From' or the 'Check Out To' are between the startTime and endTime, and
    • The Title column in 'Desks List' matches the 'Desk Text' column in 'Desks Reservations List' and
    • The Active column in 'Desk List' equals 1

    Beyond that, I am not familiar with that template other than I have responded to a number of similar posts (as I alluded in my initial post) where the common thread was that they did not produce the desired result. So firstly, are the bullet points above what you are seeking. If so, please check all of these points in your data as the filter should work if the data is correct.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 248 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard