cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
FacundoGorla
Level 8

Problem using Office365.CalendarPostItem. Location in particular

Hi! I'm making an App to Manage meeting rooms. The idea is to also be connected with Exchange calendar.

 

I can create a meeting from the powerapps to the Outlook calendar but using a room as location is giving me trouble.

This is the code I'm using to create a meeting:

 

Office365.CalendarPostItem(MyCalendar; DateAdd(_dateSelected; Dropdown1_1.Selected.Minutes ;Minutes); DateAdd(_dateSelected; Dropdown1.Selected.Minutes ;Minutes); "Asunto";{Location: roooms.Selected})

 

I tried that in location because the error tells me it needs a record. Now that I give it a record (wich comes from the Office365.GetRoomsV2().value) it says it was waiting a record value but in another scheme?

I don't know what data wants me to give it and there's not much info about it. I'm going to explore the "Book a Room" app to see how it works. 

4 REPLIES 4
FacundoGorla
Level 8

Re: Problem using Office365.CalendarPostItem. Location in particular

Using Office365.V2CalendarPostItem let me use Location as Text and not record. So I guess that's the solution 😁

 

EDIT: NOT a solution, doing it this way doesn't "use" the rooms, it just puts text in there but the room is still avaible and this doesn't create an event in the room calendar.

Microsoft v-siky-msft
Microsoft

Re: Problem using Office365.CalendarPostItem. Location in particular

Hi @FacundoGorla ,

 

CalendarPostItem function has been deprecated, please use V4CalendarPostItem function instead which location type is string, in the meantime, you should also add the room to requiredAttendees parameter in order to book the room successfully.

Please check this code.

 

Office365.CalendarPostItem(MyCalendarID ; "Asunto"; DateAdd(_dateSelected; Dropdown1_1.Selected.Minutes ;Minutes); DateAdd(_dateSelected; Dropdown1.Selected.Minutes ;Minutes); "(UTC) Coordinated Universal Time";{requiredAttendees: <Room Email>; location:<Room Name>})

 

Note: Please replace the <Room Email> and <Room Name>.  you can use Office365Outlook.GetRooms().value formula to get the room info.

Snipaste_2019-12-30_11-07-56.png

Sik

FacundoGorla
Level 8

Re: Problem using Office365.CalendarPostItem. Location in particular

Thanks for the answer! it seems to work but now I have an error with the start and end date. It wants me to give it DateTime in the format you describe and in the previous function I used Date values. 
Don't know if I can change the whole set of values.
Maybe I stick with the V2 for a while.

 

Microsoft v-siky-msft
Microsoft

Re: Problem using Office365.CalendarPostItem. Location in particular

Hi @FacundoGorla ,

 

What is the wrong with your start and end data? 

I have test the DateAdd function in your previous function, it still can work. 

Snipaste_2019-12-31_09-31-46.png

If the error you mentioned is that there is shift in start and end time, please modify the UTC timezone to your local timezone.

Snipaste_2019-12-31_09-34-47.png

If not, please share more details with the error.

Sik

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (4,596)