cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
guyinazo
Advocate V
Advocate V

Showing a Daily Calendar view

I an creating a scheduling app where employees will sign up for procedures.  The appointments are from 0700 to 1600 in ten minute increments and is limited to only two people during that ten minute time.  When they go into schedule an appointment, I have modified the calendar screen that saves the appointment to a SharePoint list.  This is all good and well, but now I want to create a gallery that shows the selected date with the ten minute incremented time slots and then two columns to show if there is an appointment scheduled.  Would a gallery be the best in creating this or maybe something else.  And for those who know some T-SQL I would like this to be like a left join where it will return or "hard code" all of the times and only Fill a box if there is another scheduled appointment.  

Thanks for any advice.

 

TimeAppt 1Appt 2
7:00  
7:10  
7:20  
7:30  
7:40  
7:50  
8:00  
8:10  
8:20  
8:30  
8:40  
8:50  
9:00  
9:10  
9:20  
9:30  
9:40  
9:50  
10:00  
10:10  
10:20  
10:30  
10:40  
10:50  
11:00  
11:10  
11:20  
11:30  
11:40  
11:50  
12:00  
1 ACCEPTED SOLUTION

Accepted Solutions
v-bofeng-msft
Community Support
Community Support

Hi @Justin365 :

Do you want to display every appointment of the day as a column in a canvas app?

This is a bit cumbersome, because creating columns requires hard coding. I assume there are at most 2 appointments a day.(If you need more capacity, you can modify it on the basis of my formula)

I've made a test for your reference:

1\My calendar-NewCalendar

I created 2 appointments today

1.JPG

2\Add a data table control and set it's items property to:

With(
  {TheCalendar:Filter(NewCalendar,'Start Time'>=Today() && 'Start Time'<=(Today()+Time(16,0,0)))}, /*Find all appointments of the day*/
  Switch(
    CountRows(TheCalendar),
    0,
    AddColumns(
       ForAll(Sequence(54),{Time:DateAdd(Today()+Time(7,0,0),Value*10-10,Minutes)}),
       "Appt1",
       Blank(),
       "Appt2",
       Blank()      
       ),    
    1,
    AddColumns(
       ForAll(Sequence(54),{Time:DateAdd(Today()+Time(7,0,0),Value*10-10,Minutes)}),
       "Appt1",
       If(Time>=First(TheCalendar).'Start Time' && Time<=First(TheCalendar).'End Time',"Booked"),/*Get the data of the first appointment*/
       "Appt2",
       Blank()      
       ),
    2,
    AddColumns(
       ForAll(Sequence(54),{Time:DateAdd(Today()+Time(7,0,0),Value*10-10,Minutes)}),
       "Appt1",
       If(Time>=First(TheCalendar).'Start Time' && Time<=First(TheCalendar).'End Time',"Booked"),
       "Appt2",
       If(Time>=Last(FirstN(TheCalendar,2)).'Start Time' && Time<=Last(FirstN(TheCalendar,2)).'End Time',"Booked")   
       )/*Get the data of the second appointment*/
  )  
)

19.gif

This solution may not be very flexible, but this is the only solution I can think of that is more in line with your requirements.

Best Regards,

Bof

View solution in original post

2 REPLIES 2
Justin365
Helper II
Helper II

Not sure if this would suffice, but have you looked at something like using a PCF Control:

https://pcf.gallery/calendar-control/

v-bofeng-msft
Community Support
Community Support

Hi @Justin365 :

Do you want to display every appointment of the day as a column in a canvas app?

This is a bit cumbersome, because creating columns requires hard coding. I assume there are at most 2 appointments a day.(If you need more capacity, you can modify it on the basis of my formula)

I've made a test for your reference:

1\My calendar-NewCalendar

I created 2 appointments today

1.JPG

2\Add a data table control and set it's items property to:

With(
  {TheCalendar:Filter(NewCalendar,'Start Time'>=Today() && 'Start Time'<=(Today()+Time(16,0,0)))}, /*Find all appointments of the day*/
  Switch(
    CountRows(TheCalendar),
    0,
    AddColumns(
       ForAll(Sequence(54),{Time:DateAdd(Today()+Time(7,0,0),Value*10-10,Minutes)}),
       "Appt1",
       Blank(),
       "Appt2",
       Blank()      
       ),    
    1,
    AddColumns(
       ForAll(Sequence(54),{Time:DateAdd(Today()+Time(7,0,0),Value*10-10,Minutes)}),
       "Appt1",
       If(Time>=First(TheCalendar).'Start Time' && Time<=First(TheCalendar).'End Time',"Booked"),/*Get the data of the first appointment*/
       "Appt2",
       Blank()      
       ),
    2,
    AddColumns(
       ForAll(Sequence(54),{Time:DateAdd(Today()+Time(7,0,0),Value*10-10,Minutes)}),
       "Appt1",
       If(Time>=First(TheCalendar).'Start Time' && Time<=First(TheCalendar).'End Time',"Booked"),
       "Appt2",
       If(Time>=Last(FirstN(TheCalendar,2)).'Start Time' && Time<=Last(FirstN(TheCalendar,2)).'End Time',"Booked")   
       )/*Get the data of the second appointment*/
  )  
)

19.gif

This solution may not be very flexible, but this is the only solution I can think of that is more in line with your requirements.

Best Regards,

Bof

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (57,653)