cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
kwatt1
Frequent Visitor

Room Booking - Filter office365 rooms

Hi

I'm creating a room booking app and am having issues filtering rooms. I don't want to pull all tenant rooms as available to book so as a Test I modified both the app startup and Room selection onvisible in the following way

 

RoomSelection (onVisible)

 If(!NoRoomsList,
ClearCollect(AllRooms, 
Filter(Office365.GetRoomsInRoomList(RoomsListsGallery.Selected.Address).value, Name = "PC42900 (Engineering Testing only)"))
);

App (startUp)

ClearCollect(AllRooms, Filter(Office365.GetRooms().value,Name = "PC4"));

 

This works fine and returns only the room 'PC42900 (Engineering Testing only)' as available to book. However I'm struggling to modify the expression so that I can either filter all rooms beginning with "PC4" or just add multiple room names in the expression (The goal being to only show about 4 rooms that all begin PC4)

 

Does anyone know the way to achieve this?

1 ACCEPTED SOLUTION

Accepted Solutions
v-xiaochen-msft
Community Support
Community Support

Hi @kwatt1 ,

 

You could try the StartsWith() function.

Please try the code below:

ClearCollect(AllRooms, Filter(Office365.GetRooms().value, StartsWith(Name,”PC4”)));

 

Best Regards,

Wearsky

If my post helps, then please consider Accept it as the solution to help others. Thanks.

View solution in original post

2 REPLIES 2
v-xiaochen-msft
Community Support
Community Support

Hi @kwatt1 ,

 

You could try the StartsWith() function.

Please try the code below:

ClearCollect(AllRooms, Filter(Office365.GetRooms().value, StartsWith(Name,”PC4”)));

 

Best Regards,

Wearsky

If my post helps, then please consider Accept it as the solution to help others. Thanks.

That worked perfectly, thanks very much!

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (1,676)