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

Book a Room Template

Hi,Does anyone know how to add email list in book a room template? Its like this, i want the user  to be able to select a name/email from a list, select a room to book and when i click on book, it will send email to that user and the meeting room. so far, i am able to send email to that meeting room and it get booked. now, i want to add name list with email in it.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Book a Room Template

Hi @Anonymous,

 

Could you please share a bit more about your Organization? Is it a Office 365 group?

Further, could you please share a bit more about the email list that you mentioned?

 

If your Organization is an Office 365 group, I think the following formula could get all users existed within your Organization:

Office365Users.SearchUser().Mail

 

In addition, if you want to select multiple email addresses from the email list and send email to the multuple users, I think the Combo box control could achieve your needs. I have made a test, please take a try with the following workaround:

 

  • Set the OnVisible property of the RoomSelectScreen screen of the template app to following formula:
ClearCollect(EmailList,Office365Users.SearchUser())
  • Add a Combo box control (ComboBox1) within the RoomSelectScreen screen of the template app, set the Items property of the Combo box control to following formula:
EmailList.Mail
  • Within the ConfirmationScreen screen of the template app, modify the formula within the OnVisible property of the screen as below:
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)}));

 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 Skype Meeting",
 MeetingsGallery.Selected.Subject), StartDateTimeUTC, EndDateTimeUTC, {RequiredAttendees: RequiredAttendeesTrue, OptionalAttendees: MeetingsGallery.Selected.OptionalAttendees,
 Body: "<a href="&SkypeMeeting.JoinUrl&">Join Skype Meeting</a>", IsHtml:true, Location: "Online Meeting", Importance: "Normal", ShowAs: "Busy"}),

 Office365.V2CalendarPostItem(MyCalendar, User().FullName & "'s Skype Meeting", StartDateTimeUTC, EndDateTimeUTC, {Body:"<a href="&SkypeMeeting.JoinUrl&">Join Skype Meeting</a>", 
 IsHtml:true, Location: "Online Meeting", Importance: "Normal", ShowAs: "Busy"})),


 If(!BookForMeeting,
 Office365.V2CalendarPostItem(MyCalendar, User().FullName & "'s Booking", StartDateTimeUTC, EndDateTimeUTC, 
 {
  RequiredAttendees:Concat(ComboBox1.SelectedItems,Mail&";"), /* <--- Modify the formula here */
  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, OptionalAttendees: MeetingsGallery.Selected.OptionalAttendees, Body: "Room has been updated to " & RoomsGallery.Selected.Name, Location: RoomsGallery.Selected.Name, Importance: "Normal", ShowAs: "Busy"})
 )
);
UpdateContext({ShowLoading: false})

 

More details about the Combo box control in PowerApps, please check the following article:

Combo box control

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.

View solution in original post

9 REPLIES 9
Community Support Team
Community Support Team

Re: Book a Room Template

Hi @Anonymous,

 

Could you please share a screenshot of your app's configuration?

Further, do you want the user to select a email from the list (email list) and then send an email to the user when you click on Book?

 

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

 

  • Add a Drop down control (Dropdown1) within the RoomSelectScreen screen of the template app, then set the Items property of the Drop down control to following formula:
Office365Users.SearchUser().Mail

2.JPG

 

  • Within the ConfirmationScreen screen of the template app, modify the formula within the OnVisible property of the screen as below:
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)}));

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 Skype Meeting",
MeetingsGallery.Selected.Subject), StartDateTimeUTC, EndDateTimeUTC, {RequiredAttendees: RequiredAttendeesTrue, OptionalAttendees: MeetingsGallery.Selected.OptionalAttendees,
Body: "<a href="&SkypeMeeting.JoinUrl&">Join Skype Meeting</a>", IsHtml:true, Location: "Online Meeting", Importance: "Normal", ShowAs: "Busy"}),

Office365.V2CalendarPostItem(MyCalendar, User().FullName & "'s Skype Meeting", StartDateTimeUTC, EndDateTimeUTC, {Body:"<a href="&SkypeMeeting.JoinUrl&">Join Skype Meeting</a>",
IsHtml:true, Location: "Online Meeting", Importance: "Normal", ShowAs: "Busy"})),



If(!BookForMeeting,
Office365.V2CalendarPostItem(MyCalendar, User().FullName & "'s Booking", StartDateTimeUTC, EndDateTimeUTC,
{
RequiredAttendees:Dropdown1.Selected.Mail, /* Modify the formula here */
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, OptionalAttendees: MeetingsGallery.Selected.OptionalAttendees, Body: "Room has been updated to " & RoomsGallery.Selected.Name, Location: RoomsGallery.Selected.Name, Importance: "Normal", ShowAs: "Busy"})
)
);
UpdateContext({ShowLoading: false})

3.JPG

 

 

 

 

Best regards,

Kris

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

Re: Book a Room Template

Hi Kris,

 

Thank you so much for responding to me. 🙂

 

I tried your code for this one:

  • Add a Drop down control (Dropdown1) within the RoomSelectScreen screen of the template app, then set the Items property of the Drop down control to following formula: 
    Office365Users.SearchUser().Mail

However, it does not populate all emails from my organization. It only populate one and that is not from my org.

 

But most importantly, thank you so much for coming up with this. But, I want the user to be able to select more than one emails rather to just only one.

 

Thank you and have a nice day 🙂

Community Support Team
Community Support Team

Re: Book a Room Template

Hi @Anonymous,

 

Could you please share a bit more about your Organization? Is it a Office 365 group?

Further, could you please share a bit more about the email list that you mentioned?

 

If your Organization is an Office 365 group, I think the following formula could get all users existed within your Organization:

Office365Users.SearchUser().Mail

 

In addition, if you want to select multiple email addresses from the email list and send email to the multuple users, I think the Combo box control could achieve your needs. I have made a test, please take a try with the following workaround:

 

  • Set the OnVisible property of the RoomSelectScreen screen of the template app to following formula:
ClearCollect(EmailList,Office365Users.SearchUser())
  • Add a Combo box control (ComboBox1) within the RoomSelectScreen screen of the template app, set the Items property of the Combo box control to following formula:
EmailList.Mail
  • Within the ConfirmationScreen screen of the template app, modify the formula within the OnVisible property of the screen as below:
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)}));

 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 Skype Meeting",
 MeetingsGallery.Selected.Subject), StartDateTimeUTC, EndDateTimeUTC, {RequiredAttendees: RequiredAttendeesTrue, OptionalAttendees: MeetingsGallery.Selected.OptionalAttendees,
 Body: "<a href="&SkypeMeeting.JoinUrl&">Join Skype Meeting</a>", IsHtml:true, Location: "Online Meeting", Importance: "Normal", ShowAs: "Busy"}),

 Office365.V2CalendarPostItem(MyCalendar, User().FullName & "'s Skype Meeting", StartDateTimeUTC, EndDateTimeUTC, {Body:"<a href="&SkypeMeeting.JoinUrl&">Join Skype Meeting</a>", 
 IsHtml:true, Location: "Online Meeting", Importance: "Normal", ShowAs: "Busy"})),


 If(!BookForMeeting,
 Office365.V2CalendarPostItem(MyCalendar, User().FullName & "'s Booking", StartDateTimeUTC, EndDateTimeUTC, 
 {
  RequiredAttendees:Concat(ComboBox1.SelectedItems,Mail&";"), /* <--- Modify the formula here */
  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, OptionalAttendees: MeetingsGallery.Selected.OptionalAttendees, Body: "Room has been updated to " & RoomsGallery.Selected.Name, Location: RoomsGallery.Selected.Name, Importance: "Normal", ShowAs: "Busy"})
 )
);
UpdateContext({ShowLoading: false})

 

More details about the Combo box control in PowerApps, please check the following article:

Combo box control

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.

View solution in original post

aaron4zion
Level: Power Up

Re: Book a Room Template

Were you ever able to find a solution for this?

keving
Level: Power Up

Re: Book a Room Template

 

I am attempting something similiar: book a room + add attendees.

Via additional forum digging I was able to get the combobox results I wanted with:

RoomSelectScreen Combobox item: 

Office365Users.SearchUser({searchTerm: ComboBox4.SearchText})  

Additionally, I used your ConfirmationScreen coding and modified the formula to point to my ComboBox.

 

However, the app no longer books rooms. 

It only sends a meeting invite to the selected combobox users. Not the room. 

 

When looking at the meeting appointment I noticed that the room is no longer being added to the send field. Instead the room is only added to the location. 

 

Thoughts?

 

Thanks. 

 

(P.S. any idea on how to add editable meeting details? Primarily the subject.)

keving
Level: Power Up

Re: Book a Room Template

Via additional forum digging I was able to produce the results I wanted in the combobox with:

Combobox item: Office365Users.SearchUser({searchTerm: ComboBox4.SearchText})  

 

With the suggested coding on the Confirmation page: 

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)}));

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 Skype Meeting",
MeetingsGallery.Selected.Subject), StartDateTimeUTC, EndDateTimeUTC, {RequiredAttendees: RequiredAttendeesTrue, OptionalAttendees: MeetingsGallery.Selected.OptionalAttendees,
Body: "<a href="&SkypeMeeting.JoinUrl&">Join Skype Meeting</a>", IsHtml:true, Location: "Online Meeting", Importance: "Normal", ShowAs: "Busy"}),

Office365.V2CalendarPostItem(MyCalendar, User().FullName & "'s Skype Meeting", StartDateTimeUTC, EndDateTimeUTC, {Body:"<a href="&SkypeMeeting.JoinUrl&">Join Skype Meeting</a>", 
IsHtml:true, Location: "Online Meeting", Importance: "Normal", ShowAs: "Busy"})),


If(!BookForMeeting,
Office365.V2CalendarPostItem(MyCalendar, User().FullName & "'s Booking", StartDateTimeUTC, EndDateTimeUTC, 
{
RequiredAttendees:Concat(ComboBox4.SelectedItems,Mail&";"), /* <--- Modify the formula here */
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, OptionalAttendees: MeetingsGallery.Selected.OptionalAttendees, Body: "Room has been updated to " & RoomsGallery.Selected.Name, Location: RoomsGallery.Selected.Name, Importance: "Normal", ShowAs: "Busy"})
)
);
UpdateContext({ShowLoading: false})

However, the app no longer books a room. It sends a meeting invite to the added users but not to the room so the room never gets booked.

 

Thoughts? 

Thanks!

 

JSibelo
Level: Powered On

Re: Book a Room Template

How did you get the room to send the mail, by default it does not send a mail to the selected meeting room after app is published.

Note, I removed the SFB connector as this is in preview and just does not connect.

tiaanop123
Level: Powered On

Re: Book a Room Template

hi

 

I want to use this app in our reception area, the only modification i need to do is to add a person's name or email so that when they click on book and the reception ladies go check on the rooms it will say the name or email of the person who booked the room. i tried to add the dropdown1 in the roomlistselectscreen, i manage to get the office36users.searchusers()mail to work and show the emails of the people in my org, but as soon as i go down to add the next step as suggested above "

RequiredAttendees:Dropdown1.Selected.Mail, /* Modify the formula here */
Location: RoomsGallery.Selected.Name,
Importance: "Normal", ShowAs: "Busy""


 then my app gives errors and i cannot run it. what exactly am i doing wrong? do i need to put something where it says modfify the formula here or do i just paste it as is?

tiaanop123
Level: Powered On

Re: Book a Room Template

hi there, can anyone help me plz?

Helpful resources

Announcements
thirdimage

Power Automate 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

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 207 members 5,354 guests
Please welcome our newest community members: