Hi, I am modifying the Book a Room app. I have successfully added a search box (called tbSearchInput) on the 'RoomSelectScreen' so that you can filter the the rooms displayed (within 'RoomsGallery') when you are booking a room. Using this code: Filter(AvailableRoomEmailName,tbSearchInput.Text in Email)
But I'd also like to add a dropdown box that uses the Department that rooms are in. I have assigned rooms to different departments in the Office Exchange settings. In my testing so far I can add a Dropdown that can filter by email using this code:
Filter(AvailableRoomEmailName,Dropdown1.Selected.Value in Email) But if I change this to Department it doesn't work.
It's as if it's not collecting a rooms department, only it's name and email. I can see the code (see below) on the 'OnVisible' property of the 'RoomSelectScreen' mentions email and name so I'm thinking this is where I need to tell it to collect the Department as well but everything I have tried has failed.
Any help would be much appreciated. Many thanks, Rob
'OnVisible' code of 'RoomSelectScreen'
Set(CalendarFromSelectMeeting, false);
If(DateTimeRoomChange,
Set(AvailableRoomsCounter, 1);
UpdateContext({ShowLoading: true});
Set(RoomsLeft, Blank());
Set(DateTimeRoomChange, false);
If(!NoRoomsList,
ClearCollect(AllRooms, Office365.GetRoomsInRoomList(RoomsListsGallery.Selected.Address).value)
);
If(CountRows(AllRooms) > 20,
Set(AllRoomsConnector, Concat(FirstN(AllRooms, 20), Address & ";")),
Set(AllRoomsConnector, Concat(AllRooms, Address & ";"))
);
ClearCollect(AvailableRooms, Office365.FindMeetingTimes({RequiredAttendees: AllRoomsConnector, IsOrganizerOptional: true,
Start: StartDateTimeUTC, End: EndDateTimeUTC, MeetingDuration: DateDiff(StartDateTime, EndDateTime, Minutes),
MinimumAttendeePercentage: "1", ActivityDomain: "Unrestricted"}));
ClearCollect(AvailableRoomsSorted, SortByColumns(First(AvailableRooms).MeetingTimeSuggestions, "Confidence", Descending));
ClearCollect(AvailableRoomsConcat, Concat(Filter(First(AvailableRoomsSorted).AttendeeAvailability, Availability = "Free"),
Attendee.EmailAddress.Address, ","));
ClearCollect(AvailableRoomEmails, Split(First(AvailableRoomsConcat).Value, ","));
ClearCollect(AvailableRoomEmailName, AddColumns(RenameColumns(AvailableRoomEmails, "Result", "Email"), "Name",
LookUp(AllRooms, Email = Address).Name));
UpdateContext({ShowLoading: false});
Set(RoomsLeft, CountRows(AllRooms) - 20 * AvailableRoomsCounter)
)