cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Displaying a room calendar in powerapps

Hi there,

 

So I have spent around a week now trying to display my room calendars in a powerapp similar to how I would display my own calendar.

 

I have tried using the app templates and haven't found anything to help and I have been looking over all of the forums I could find to try and support  it but I was unsuccessful.

 

All I really need to do is to view each room calendar and the see the events and click on the events, basically like the calendar that is a template screen.

 

Any help would be appriciated.

 

Many Thanks

 

Charlotte

21 REPLIES 21
v-xida-msft
Community Support
Community Support

Hi @Anonymous ,

Could you please share a bit more about your scenario?

Do you want to display related events based on specific Outlook Calendar Room within your app?

 

The user @AndiRodi has faced similar issue with you, please check my response within the following thread:

https://powerusers.microsoft.com/t5/Building-PowerApps-Formerly/How-to-get-Resource-room-s-Calendar-ID/m-p/327815

 

I have made a test on my side, please consider take a try with the following workaround:

3.JPG4.JPG5.JPG
Set the Items property of the Dropdown1 to following:

Office365Outlook.GetRooms().value

Set the Items proeprty of the Dropdown2 to following:

Office365Outlook.CalendarGetTables().value

Set the Items property of the Gallery to following (List Events based on selected Calendar table and Room):

Filter(
Office365Outlook.V2CalendarGetItems(Dropdown2.Selected.Name).value,
Location = Dropdown1.Selected.Name
)

Please consider take a try with above solution, then check if the issue is solved.

 

The attached same app as below.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi,

 

I have already read and tried that other thread response and I couldn't get it to work.

 

I am more trying to achieve an actual calendar output, exactly like the calendar screen that powerapps provide just with room calendars instead of the users calendars, if that makes sense?

 

 

Hi @Anonymous ,

Do you want to make a Calendar screen with Room Calendar selection rather than User's calendar selections?

 

I have made a test on my side, please take a try with the following workaround:17.JPG

 

18.JPG

1. Add a Calendar screen within your app.

2. Set the Items property of the Dropdown box (dropdownCalendarSelection1) to following:

Office365Outlook.GetRooms().value

3. Set the Items property of the CalendarEventsGallery1 to following:

/*Shows events only on selected date*/
SortByColumns(
Filter(
MyCalendarEvents,
Text(Start, DateTimeFormat.ShortDate) = Text(_dateSelected, DateTimeFormat.ShortDate),
Location = dropdownCalendarSelection1.Selected.Name
),
"Start"
)

Please consider take a try with above solution, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Thats exactly what I am trying to do.

 

The drop down list now shows the room selection, however none of the events are showing and the code on the screenshot below is bringing up an error code for :

MyCalendarEvents, Office365Outlook.GetEventsCalendarViewV2(_myCalendar.Name, Text(_minDate, UTC), Text(

 

On the OnSelect Function of the dropdownscreen.png

 

Hi @Anonymous ,

Please consider set the OnSelect property fo the dropdownCalendarSelection1 box to following:

/*retrieves calendar events for all days in current month view and selected calendar 
_minDate and _maxDate act as markers to prevent duplicate data collection*/         
If(IsBlank(_userDomain),         
	UpdateContext({_showLoading: true});         
	Set(_userDomain, Right(User().Email, Len(User().Email) - Find("@", User().Email)));         
	Set(_dateSelected, Today());         
	Set(_firstDayOfMonth, DateAdd(Today(), 1 - Day(Today()), Days));         
	Set(_firstDayInView, DateAdd(_firstDayOfMonth, -(Weekday(_firstDayOfMonth) - 2 + 1), Days));         
	Set(_lastDayOfMonth, DateAdd(DateAdd(_firstDayOfMonth, 1, Months), -1, Days))         
);         
Set(_calendarVisible, false);         
UpdateContext({_showLoading: true});         
Set(_myCalendar, LookUp(Office365Outlook.CalendarGetTables().value, DisplayName="Calendar"));   /* <-- Modify formula here */        
Set(_minDate, DateAdd(_firstDayOfMonth, -(Weekday(_firstDayOfMonth) - 2 + 1), Days));         
Set(_maxDate, DateAdd(DateAdd(_firstDayOfMonth, -(Weekday(_firstDayOfMonth) - 2 + 1), Days), 40, Days));         
ClearCollect(MyCalendarEvents, Office365Outlook.GetEventsCalendarViewV2(_myCalendar.Name, Text(_minDate, UTC), Text(_maxDate, UTC)).value);         
UpdateContext({_showLoading: false});         
Set(_calendarVisible, true)

Please take a try with above solution, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

That's worked, thank you,

 

only thing that hasn't is events that are going across more than one day, it only shows on the calendar for the first day of the event, how can i make it show every day of the event on the calendar?

 

Many Thanks

 

Charlotte

Hi @Anonymous ,

I have made a test on my side, and don't have the issue that you mentioned. Each event of a Recurrence event would show up within the Events Gallery.19.JPG

 

Please make sure the event you created in your Outlook calendar is a Recurrence event.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

I have checked the calendar in outlook and the event goes from 8:00 21st october, to 17:00 22nd october. However only shows up as an event on the 21st october, yet when i type in Text(ThisItem.end,ShortDate) it brings up the 22nd.

 

So it knows that's when it ends but it isn't showing on the calendar

Anonymous
Not applicable

I have just realised, its still bringing up my calendar rather than the room calendar as the default is set to myCalendar.Name however the events in my calendar are the same as the room so I didn't notice, what should I set the default as?

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

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.

Users online (1,346)