cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RobChilds
Helper II
Helper II

Book a room template - adding message/meeting details

Hi, I have successfully followed this guide to add attendees to a meeting booking (using VarAttendees variable)...

https://powerusers.microsoft.com/t5/Building-Power-Apps/sending-invites-in-Book-a-room-app-template/...

 

What I'm hoping to do next is add a message to go with the meeting request.

 

I have created a Subject text input box called "inputSubject" and a Message text input box called "inputBody" which are on the RoomSelect screen.

 

I just can't figure out where to add these in exactly. I think it goes into the OnVisible property of the Confirmation Screen maybe? (see below)

 

If(
IsBooking,
UpdateContext({ShowLoading: true});
Set(AvailableRoomsCounter, 1);
If(
!BookForMeeting,
Office365.V2CalendarPostItem(
MyCalendar,
User().FullName & "'s Booking",
StartDateTimeUTC,
EndDateTimeUTC,
{
RequiredAttendees: RoomsGallery.Selected.Email & ";" & VarAttendees,
Location: RoomsGallery.Selected.Name,
Importance: "Normal",
ShowAs: "Busy"
}
),
ClearCollect(
RequiredAttendeesNoRoom,
Split(
MeetingsGallery.Selected.RequiredAttendees,
";"
)
);
ForAll(
AllRooms,
RemoveIf(
RequiredAttendeesNoRoom,
Address = Result
)
);
ClearCollect(
RequiredAttendeesNoRoom,
Concat(
RequiredAttendeesNoRoom,
Result & ";"
)
);
ClearCollect(
RequiredAttendeesNoRoom,
Split(
First(RequiredAttendeesNoRoom).Value,
";;"
)
);
Set(
RequiredAttendeesFinal,
First(RequiredAttendeesNoRoom).Result
);
Set(
RequiredAttendeesTrue,
RoomsGallery.Selected.Email & ";" & RequiredAttendeesFinal
);
Office365.V2CalendarPatchItem(
MyCalendar,
MeetingsGallery.Selected.Id,
If(
MeetingsGallery.Selected.Subject = User().FullName & "'s Skype Meeting",
User().FullName & "'s Booking",
MeetingsGallery.Selected.Subject
),
StartDateTimeUTC,
EndDateTimeUTC,
{
RequiredAttendees: RequiredAttendeesTrue & ";" & VarAttendees,
OptionalAttendees: MeetingsGallery.Selected.OptionalAttendees,
Body: "Room has been updated to " & RoomsGallery.Selected.Name,
Location: RoomsGallery.Selected.Name,
Importance: "Normal",
ShowAs: "Busy"
}
)
);
UpdateContext({ShowLoading: false})
);
Set(
IsBooking,
false
)

 

Any help would be greatly appreciated.

 

Thanks,

Rob

5 REPLIES 5
RobChilds
Helper II
Helper II

I managed to figure this out thankfully through looking into the Office365.V2CalendarPatchItem and using the hint text that appears at the top. This lists the order it is expecting values, and what each part does. 

seanyee
Frequent Visitor

do you mind share the code/solution here, i currently building the same thing and having headache all over internet for solution.

do you mind share the code/solution here, i currently building the same thing and having headache all over internet for solution.

RobChilds
Helper II
Helper II

Sure, see below. I made a mistake in my post above, it wasn't the CalendarPatch item but CalendarPost item. Anyway here you go hope it helps...

 

If(
IsBooking,
UpdateContext({ShowLoading: true});
Set(
AvailableRoomsCounter,
1
);
If(
!BookForMeeting,
Office365.V2CalendarPostItem(
MyCalendar,
inputSubject,
StartDateTimeUTC,
EndDateTimeUTC,
{
RequiredAttendees: RoomsGallery.Selected.Email & ";" & VarAttendees,
Body: inputBody.Text,
Location: RoomsGallery.Selected.Name,
Importance: "Normal",
ShowAs: "Busy"
}
),
ClearCollect(
RequiredAttendeesNoRoom,
Split(
MeetingsGallery.Selected.RequiredAttendees,
";"
)
);
ForAll(
AllRooms,
RemoveIf(
RequiredAttendeesNoRoom,
Address = Result
)
);
ClearCollect(
RequiredAttendeesNoRoom,
Concat(
RequiredAttendeesNoRoom,
Result & ";"
)
);
ClearCollect(
RequiredAttendeesNoRoom,
Split(
First(RequiredAttendeesNoRoom).Value,
";;"
)
);
Set(
RequiredAttendeesFinal,
First(RequiredAttendeesNoRoom).Result
);
Set(
RequiredAttendeesTrue,
RoomsGallery.Selected.Email & ";" & RequiredAttendeesFinal
);
Office365.V2CalendarPatchItem(
MyCalendar,
MeetingsGallery.Selected.Id,
If(
MeetingsGallery.Selected.Subject = User().FullName & "'s Skype Meeting",
User().FullName & "'s Booking",
MeetingsGallery.Selected.Subject
),
StartDateTimeUTC,
EndDateTimeUTC,
{
RequiredAttendees: RequiredAttendeesTrue & ";" & VarAttendees,
OptionalAttendees: MeetingsGallery.Selected.OptionalAttendees,
Body: "Room has been updated to " & RoomsGallery.Selected.Name,
Location: RoomsGallery.Selected.Name,
Importance: "Normal",
ShowAs: "Busy"
}
)
);
UpdateContext({ShowLoading: false})
);
Set(
IsBooking,
false
)

seanyee
Frequent Visitor

Thanks, i managed to figure myself as well.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Check out the New Ideas Site

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (3,239)