cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RobChilds
Helper I
Helper I

Display whole collection in gallery for filtering in Book a Room Template

In the Book a Room template, on RoomSelectScreen page I want the RoomsGallery to display all of the results that are contained in the AvailableRoomEmailName collection.

 

This is because I have a dropdown box to filter the room displayed - this worked fine in testing as I only added a handful of rooms, but as I have now added all rooms (equalling 93) the filter no longer works as the gallery doesn't display all of the collection.

 

Any help would be greatly appreciated.

 

Thanks,

Rob

1 ACCEPTED SOLUTION

Accepted Solutions
StalinPonnusamy
Community Champion
Community Champion

Hi @RobChilds 

 

The best practice is to use the filter to make sure results are under the configured settings.

 

Example: (Optional Dropdown and Text Search)

With(
    {
        sData: Filter(
            'Issue tracker',
            IsBlank(ComboBox3.SelectedItems.Value) || IsEmpty(ComboBox3.SelectedItems) || Priority.Value = ComboBox3.Selected.Value
        )
    },
    If(
        Not(IsBlank(TextInput2.Text)),
        Search(
            sData,
            TextInput2.Text,
            "Title"
        ),
        sData
    )
)

  

"Please do not forget to give kudos if you find the suggestion helpful or Accept it as a solution if works fine to help other users to find it useful. "

View solution in original post

5 REPLIES 5
navso
Regular Visitor

Hi @RobChilds ,

 

Try using Filter formula in the Items property of your gallery. Just make sure that you have the latest data from your datasoure/collection.

RobChilds
Helper I
Helper I

Thanks @navso ...

 

I do have a filter but as the gallery doesn't display all items of the collection the filter doesn't work correctly (or rather it only filters the results that are visible, not all the results that are within the collection).

 

Cheers,

Rob

StalinPonnusamy
Community Champion
Community Champion

Hi @RobChilds 

 

By default, the app pulls only 500 records. but you can change up to 2000 (Max) through settings.

 

File > Settings > Data row limit

StalinPonnusamy_0-1627661781632.png

 

Limitation:

StalinPonnusamy_1-1627661828932.png

 

Please let us know any questions about the filter that we can help with.

StalinPonnusamy
Community Champion
Community Champion

Hi @RobChilds 

 

The best practice is to use the filter to make sure results are under the configured settings.

 

Example: (Optional Dropdown and Text Search)

With(
    {
        sData: Filter(
            'Issue tracker',
            IsBlank(ComboBox3.SelectedItems.Value) || IsEmpty(ComboBox3.SelectedItems) || Priority.Value = ComboBox3.Selected.Value
        )
    },
    If(
        Not(IsBlank(TextInput2.Text)),
        Search(
            sData,
            TextInput2.Text,
            "Title"
        ),
        sData
    )
)

  

"Please do not forget to give kudos if you find the suggestion helpful or Accept it as a solution if works fine to help other users to find it useful. "

View solution in original post

Thanks @StalinPonnusamy 

 

I have a collection (AvailableRoomEmailName) of a maximum of 93 items. These items are displayed in a Gallery (RoomsGallery) which can be filtered by a dropdown.

 

The trouble I'm having is that the gallery doesn't automatically display up to 93 items, it is being limited somehow. 

 

Here's is the code on the OnVisible property of the screen that I think that needs changing to allow the RoomsGallery to display more items...

 

Set(IsPrevRoomSelect, false);

If(DateTimeRoomChange,

    Set(AvailableRoomsCounter, 1);

    UpdateContext({ShowLoading: true});

    Set(RoomsLeft, Blank());

    If(!NoRoomsList,

        ClearCollect(AllRooms, Office365.GetRoomsInRoomList(RoomsListsGallery.Selected.Address).value)

    );

    Set(DateTimeRoomChange, false);

    /*

    If(CountRows(AllRooms) > 20,

        Set(AllRoomsConnector, Concat(FirstN(AllRooms, 20), Address & ";"));

        If(CountRows(AllRooms) > 40,

            Set(AllRoomsConnector1, Concat(LastN(FirstN(AllRooms, 40), 20), Address & ";"))

        ),

        Set(AllRoomsConnector, Concat(AllRooms, Address & ";"))

    );

    */

    Set(AllRoomsConnector, Concat(FirstN(AllRooms, 20), Address & ";"));

 

    

    Concurrent(

        ClearCollect(AvailableRooms, Office365.FindMeetingTimes({RequiredAttendees: AllRoomsConnector, IsOrganizerOptional: true,

            Start: StartDateTimeUTC, End: EndDateTimeUTC, MeetingDuration: DateDiff(StartDateTime, EndDateTime, Minutes),

            MinimumAttendeePercentage: "1", ActivityDomain: "Unrestricted"})),

 

        If(CountRows(AllRooms) > 20,

            If(CountRows(AllRooms) > 40,

                Set(AllRoomsConnector1, Concat(LastN(FirstN(AllRooms, 40), 20), Address & ";")),

                Set(AllRoomsConnector1, Concat(LastN(AllRooms, CountRows(AllRooms) - 20), Address & ";"))

            );

            ClearCollect(AvailableRooms1, Office365.FindMeetingTimes({RequiredAttendees: AllRoomsConnector1, IsOrganizerOptional: true,

                Start: StartDateTimeUTC, End: EndDateTimeUTC, MeetingDuration: DateDiff(StartDateTime, EndDateTime, Minutes),

                MinimumAttendeePercentage: "1", ActivityDomain: "Unrestricted"})

            ),

        Clear(AvailableRooms1)

        )

 

    );

    If(CountRows(AllRooms) > 20,

        Collect(AvailableRooms, AvailableRooms1)

    );

    ClearCollect(AvailableRoomsSorted, SortByColumns(First(AvailableRooms).MeetingTimeSuggestions, "Confidence", Descending), If(CountRows(AllRooms) > 20, SortByColumns(Last(AvailableRooms).MeetingTimeSuggestions, "Confidence", Descending)));

 

    ClearCollect(AvailableRoomsConcat, Concat(Filter(First(AvailableRoomsSorted).AttendeeAvailability, Availability = "Free"),

        Attendee.EmailAddress.Address, ","), If(CountRows(AllRooms) > 20, Concat(Filter(Last(AvailableRoomsSorted).AttendeeAvailability, Availability = "Free"),

        Attendee.EmailAddress.Address, ",")));

 

    ClearCollect(AvailableRoomEmails, Split(First(AvailableRoomsConcat).Value, ","), If(CountRows(AllRooms) > 20, Split(Last(AvailableRoomsConcat).Value, ",")));

 

    ClearCollect(AvailableRoomEmailName, Filter(AddColumns(RenameColumns(AvailableRoomEmails, "Result", "Email"), "Name",

        LookUp(AllRooms, Email = Address).Name), Name <> "Car Park Space 1E", Name <> "Car Park Space 2E", Name <> "Car Park Space 3", Name <> "Car Park Space 4", Name <> "Car Park Space 5", Name <> "Car Park Space 6", Name <> "Car Park Space 7", Name <> "RC_Zoom"));

    UpdateContext({ShowLoading: false});

    Set(RoomsLeft, CountRows(AllRooms) - 40 * AvailableRoomsCounter)

);

Clear(AvailableRooms);

Clear(AvailableRooms1);

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (1,517)