Power Apps Exchange

Please login or click SIGN UP FOR FREE to create your PowerAppsUG account to join this user group.
 View Only
  • 1.  Filterdropdown with a big gallery stucks / page unresponsive

    Posted Oct 26, 2022 05:31 AM
    I have  big gallery with 500 items.
    I collect them when loading the screen and use it in the Gallery Items.

    Within the gallery items, i have also 1 search field and 2 filter dropdowns.
    This is how it looks like.


    When filtering, the whole app stucks and sometimes it gets unresponsive.
    I think the problem is, that the gallery is showing all 500 items at the time.
    Is it possible to limit the shown items to 100 and when you scroll to the bottom it shows the next 100?





    ------------------------------
    Fabian Heil
    ------------------------------


  • 2.  RE: Filterdropdown with a big gallery stucks / page unresponsive

    Top Contributor
    Posted Nov 10, 2022 08:56 PM
    @Fabian Heil,
    A couple of things - firstly please post your code in Text​ as the below is OCRd so watch spelling.
    With(
       {
          records:
          Filter(
             colxxxxxx,
             (
                IsBlank(varProjektFilter) || 
                Beschäftigungsprojekt = varProjektFilter
             ) &&
             (
                IsBlank(varStatusFilter) || 
                'Status - Urlaubsplan' = varStatusFilter
             ) && 
             (
                Len(inpSearchMitarbeiterPRD.Text) = 0 ||
                inpSearchMitarbeiterPRD.Text in creda_nachname
             )
          )
       },
       ForAll(
          Sequence(CountRows(records)),
          Patch(
             Last(
                FirstN(
                   records,
                   Value
                )
             ),
             {rowNumber: Value}
          )
       )
    )​

    Also you are filtering on Variable rather than directly on the drop-downs, so there is another process before the filter starts. As well I have combined all the functions into a Filter rather than Search happening afterwards.



    ------------------------------
    Warren Belz
    Queensland Australia
    ------------------------------