cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

Adding list of services to Book A Room template

Hello,

 

I would like to use the Book A Room PowerApp to allow our users to book meeting spaces on our campus. I was wondering how I would go about adding a services drop down where the user could select one or multiple services that they may need in the room like a projector, laptop, catering or other services. I would like for these services to be added to the meeting that gets generated so that it is easy to see what people need for each meeting. Could anybody point me in the right direction as to where to start with something like this?

 

Thanks,

Brendan

5 REPLIES 5
Highlighted
Impactful Individual
Impactful Individual

Re: Adding list of services to Book A Room template

I'd start by creating a list in Sharepoint called Bookings and have these columns

Room - SL text
start time - time date

end time - time date

Projector - y/n

Laptop - y/n

Catering - y/n

Highlighted
Community Support
Community Support

Re: Adding list of services to Book A Room template

Hi @PlakeB ,

Could you please share a bit more about your scenario?

Do you want to add a Dropdown box within your template app to list the available services, and then you want to embed the selected service into your generated meeting?

 

Based on the needs that you mentioned, I think the ComboBox control could achieve your needs. You could consider add a ComboBox control within your "RoomSelectScreen", then set the Items property of the ComboBox to your service options table. When referencing multiple values from the ComboBox, and concate them into a string value, please use the following formula:

Concat(ComboBox1.SelectedItems, Value & "; ")

 

Then go to your ConfirmationScreen, modify the formula within the OnVisible property to following:

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

        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: "Services: " & Concat(ComboBox1.SelectedItems, Value & "; ") & "<br><a href="&SkypeMeeting.JoinUrl&">Join Skype Meeting</a>", IsHtml:true, Location: "Online Meeting", Importance: "Normal", ShowAs: "Busy"}),  // Modify formula here -> Concat(ComboBox1.SelectedItems, Value & "; ")

            Office365.V2CalendarPostItem(MyCalendar, User().FullName & "'s Skype Meeting", StartDateTimeUTC, EndDateTimeUTC, {Body: "Services: " & Concat(ComboBox1.SelectedItems, Value & "; ") & "<br><a href="&SkypeMeeting.JoinUrl&">Join Skype Meeting</a>", 
            IsHtml:true, Location: "Online Meeting", Importance: "Normal", ShowAs: "Busy"})), // Modify formula here -> Concat(ComboBox1.SelectedItems, Value & "; ")



        If(!BookForMeeting,
            Office365.V2CalendarPostItem(MyCalendar, User().FullName & "'s Booking -- Services: " & Concat(ComboBox1.SelectedItems, Value & "; "), StartDateTimeUTC, EndDateTimeUTC, 
            {RequiredAttendees:RoomsGallery.Selected.Email, Location: RoomsGallery.Selected.Name, Importance: "Normal", ShowAs: "Busy"}),   // Modify formula here
            
            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 & "Services: " & Concat(ComboBox1.SelectedItems, Value & "; "), Location: RoomsGallery.Selected.Name, Importance: "Normal", ShowAs: "Busy"})  // Modify formula here
            )
    );
    UpdateContext({ShowLoading: false})
);
Set(IsBooking, false)

Please consider take a try with the following 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.
Highlighted
Regular Visitor

Re: Adding list of services to Book A Room template

@v-xida-msft Thanks so much for the reply! I followed the instructions and added the necessary bits of code to the pages you referenced but now on the ConfirmationScreen OnVisible box it's telling me that the value identifier in Concat(ServicesSelection.SelectedItems, Value & "; ") & " isn't recognized. When I ran the app to test the services box functions and allows me to select multiple items, which is exactly what I wanted! But then when I submit the booking, a meeting is no longer generated.

Highlighted
Community Support
Community Support

Re: Adding list of services to Book A Room template

Hi @PlakeB ,

Could you please share a bit more about the formula you typed within the Items property of the ComboBox control?

Do you type a Distinct(...) formula within ComboBox's Items property?

Further, could you please share more details about the error within your app?

 

If you typed Distinct(...) formula within the ComboBox control, please consider modify above Concat formula as below:

Concat(ServicesSelection.SelectedItems, Result & "; ") 

 

or you may need to type the following formula:

Concat(ServicesSelection.SelectedItems, ColumnName & "; ") 

Note: The ColumnName represents the column which you used as Display value within your ComboBox (ServicesSelections).

 

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.
Highlighted
Regular Visitor

Re: Adding list of services to Book A Room template

Hi @v-xida-msft 

 

Thanks again fro your reply. So I used the initial code you sent me and created the combo box, linked it with my service list table from an excel sheet and then that's all I did with the box. It functions like I believe it should. I am able to click the drop down, see the list of the data that I put in the table, and then select multiple options.

 

The issue is on the Confirmation Screen. When I edited the code for OnVisible and added in the commands to add the selected items to the body of the event like you suggested, the error message is the same no matter if I type Value, ColumnName or Result;

 

"Name isn't valid, The identifier is not recognized."

 

There are only 4 errors in the app and they are these 4 lines I inserted to add the ComboBox selections to the body of the Outlook event. I am not exactly sure what needs to go in the Concat(ServicesSelection.SelectedItems, ???) line to get it to return the selections and add them to the body of the event but that seems to be the issue.

 

Now when I go through the process to book the room, it no longer generates an outlook meeting at all.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

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