Hi,
I want to add a feature where user can send the invites to the attendees for the meeting when he books a room for a meeting. I am using Book a room template
any Idea please?
Regards
Solved! Go to Solution.
1. Automatically. The function takes effect when the ConfirmationScreen become to be visible.
2. There are two drop-down control, Combo box, and Dropdown box. one of the differences is that the combo box allows multi-selection.
The Items property of combo box:
Office365Users.SearchUser()
3. There are two Book A Room templates. please try the new one.
Sik
You can find here https://powerusers.microsoft.com/t5/Building-Power-Apps/Send-Calendar-Invites/m-p/302728
Office365.V2CalendarPostItem( Dropdown1.SelectedText.Value, createMeetingNameTextInput.Text, timeStartDatePicker.SelectedDate + Time( Value(startDateHr.Selected.Value), Value(startDateMin.Selected.Value), 0 ), timeEndDatePicker.SelectedDate + Time( Value(endDateHr.Selected.Value), Value(endDateMin.Selected.Value), 0 ), { Body: createMeetingObjectiveTxtInput.Text, IsHtml: true, RequiredAttendees: EmailRecipients } )
Hi @AppDeveloper ,
You can add a Combo box in RoomSelectScreen to select attendees, and then add the selected attendees into Office365.V2CalendarPostItem formulas in ConfirmationScreen. Please check the steps.
1. Add a combo box in RoomSelectScreen, set Onchange property:
Set(VarAttendees,Concat(ComboBox1.SelectedItems,Mail&";"))
2. Modify the OnVisible property of ConfirmationScreen, add VarAttendees variable into the RequiredAttendees parameter in Office365.V2CalendarPostItem function. You can replace OnVisible property by the following codes directly.
If(IsBooking,
UpdateContext({ShowLoading: true});
If(OnlineMeeting,
Set(OutlookMeeting, Office365.V2CalendarPostItem(
LookUp(Office365.CalendarGetTables().value,DisplayName=LookUp(CalendarLocalizedLabel,Value=DisplayName).Value).DisplayName,
"Outlook Meeting for " & If(BookForMeeting, MeetingsGallery.Selected.Subject, User().FullName),
StartDateTime,
DateAdd(StartDateTime,1,Days),{RequiredAttendees:VarAttendees}));
If(BookForMeeting,
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, RequiredAttendeesFinal);
Office365.V2CalendarPatchItem(MyCalendar, MeetingsGallery.Selected.Id, If(MeetingsGallery.Selected.Subject = User().FullName & "'s Booking", User().FullName & "'s Meeting",
MeetingsGallery.Selected.Subject), StartDateTimeUTC, EndDateTimeUTC, {RequiredAttendees: RequiredAttendeesTrue & ";" & VarAttendees, OptionalAttendees: MeetingsGallery.Selected.OptionalAttendees,
Body: "<a href="&OutlookMeeting.Location&">Join Meeting</a>", IsHtml:true, Location: "Online Meeting", Importance: "Normal", ShowAs: "Busy"}),
Office365.V2CalendarPostItem(MyCalendar, User().FullName & "'s Meeting", StartDateTimeUTC, EndDateTimeUTC, {Body:"<a href="&OutlookMeeting.Location&">Join Meeting</a>",
IsHtml:true, Location: "Online Meeting", Importance: "Normal", ShowAs: "Busy"})),
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 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)
Four modifications in total:
Sik
Hi @v-siky-msft
Thanks for your reply. I am going to try this solution this week. but before i do that will that send an automatic email to all attendees? or that is a separate setup?
Regards
Hi @v-siky-msft
Also I am a little bit confused with step 1. it says to add Combo box but in screen shot it is a drop down list? where this list is getting users(data source of this list??)
Regards
Hi
Also I noticed that the first few lines of the code on confirmation screen is different from what you have shared.
If(IsBooking,
UpdateContext({ShowLoading: true});
If(OnlineMeeting,
Set(SkypeMeeting, SkypeForBusiness.CreateMeeting("Skype Meeting for " & If(BookForMeeting, MeetingsGallery.Selected.Subject, User().FullName), {ExpirationDateTime: Text(DateAdd(StartDateTime, 1, Days), UTC)}));
how to add those changes here when it is not using PostItem method? The rest is fine
Regards
1. Automatically. The function takes effect when the ConfirmationScreen become to be visible.
2. There are two drop-down control, Combo box, and Dropdown box. one of the differences is that the combo box allows multi-selection.
The Items property of combo box:
Office365Users.SearchUser()
3. There are two Book A Room templates. please try the new one.
Sik
Hi !
Is it possible to allow there to be no drop box for the combo box just a search?