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 Apps
Answered

Time slot booking

(0) ShareShare
ReportReport
Posted on by 327

Hi all

 

I am trying to build a straightforward time slot booking system

 

  1. Patch in SharePoint list
  2. *(Dynamic) Show available time slots by date selected
  3. remove/disable once clicked on Booked

Collection:

ClearCollect(
 colAppointment,
 {
 TimeCol: "11:00",
 Booked: false
 },
 {

 TimeCol: "11:30",
 Booked: false
 },
 {

 TimeCol: "12:00",
 Booked: false
 },
 {

 TimeCol: "12:30",
 Booked: false
 },
 {
 
 TimeCol: "13:00",
 Booked: false
 },
 {

 TimeCol: "13:30",
 Booked: false
 },
 {
 
 TimeCol: "14:00",
 Booked: false
 },
 {

 TimeCol: "14:30",
 Booked: false
 }
);

Patch Btn:

Patch(
 'Solo Protect Appointments',
 Defaults('Solo Protect Appointments'),
 {
 DateOf: _DateOf.Text,
 TimeOf: _TimeOf.Text
 }
);
Patch(
 colAppointment,
 ThisItem,
 {Booked: true}
);
Refresh('Solo Protect Appointments')

App:

moerah_0-1703378406449.png

Current issue(gif)(when selecting different date "book time slot" not showing) 

moerah_2-1703378926803.gif

Thank you

 

 

Categories:
  • Verified answer
    v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @moerah ,

     

    You need the buttons' visibility bound to selected dates as well. So, OnSelect of the date button in the Calendar view, you need to update the collection and include the selected date.

     

    Collection OnVisible of Screen, with a new name colAppointment1:

    ClearCollect(
     colAppointment1,
     {
     TimeCol: "11:00",
     Booked: false
     },
     {
     TimeCol: "11:30",
     Booked: false
     },
     {
     TimeCol: "12:00",
     Booked: false
     },
     {
     TimeCol: "12:30",
     Booked: false
     },
     {
     TimeCol: "13:00",
     Booked: false
     },
     {
     TimeCol: "13:30",
     Booked: false
     },
     {
     TimeCol: "14:00",
     Booked: false
     },
     {
     TimeCol: "14:30",
     Booked: false
     }
    );

     

    OnSelect of date (if see error in LookUp function, you need to press the button once, trigger the Collect function to initialize the colAppointment2):

    Set(
     _dateSelected,
     DateAdd(
     _firstDayInView,
     ThisItem.Value,
     TimeUnit.Days
     )
    );
    If(
     IsBlank(
     LookUp(
     colAppointment2,
     Date = _dateSelected
     )
     ),
     Collect(
     colAppointment2,
     AddColumns(
     colAppointment1,
     "Date",
     _dateSelected
     )
     )
    )

    vjefferni_0-1703493751556.png

     

    Items of collection Gallery:

    Filter(
     colAppointment2,
     Date = _dateSelected
    )

    vjefferni_2-1703493778493.png

     

    Hope this helps.

     

    Best regards,

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 405 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 368

#3
WarrenBelz Profile Picture

WarrenBelz 244 Most Valuable Professional

Last 30 days Overall leaderboard