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

secondImage

Demo Extravaganza Winner Announcement

Please join us on Wednesday, July 21st at 8a PDT. We will be announcing the Winners of the Demo Extravaganza!

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,873)