cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Gallery2 loads fine but Gallery1 takes forever to load?

So I am using a "Concurrent(ClearCollect" Formula in the App.OnStart and Gallery2 loads within a sec, Gallery1 takes almost 10 minutes to load? Please see code for the Gallery1.Items. Am I doing something wrong here? It's the same code in Gallery2...

With(
    {
        galData1: Filter(
            colFuelLogEquipList,
            IsBlank(ComboBox2.SelectedItems) || IsEmpty(ComboBox2.SelectedItems) || EquipCatChoices.Value in ComboBox2.SelectedItems.Value
        )
    },
    If(
        Not(IsBlank(Owned_SearchTxtBox.Text)),
        Search(
            galData1,
            Owned_SearchTxtBox.Text,
            "Title",
            "SerialNoVIN"
        ),
        galData1
    )
)

  

13 REPLIES 13
WarrenBelz
Super User
Super User

Hi @Patrick-Stamper ,

As you are filtering a collection, you do not need to "split" the functions here as Delegation is not an issue (all processing is local). I do not think that is your issue, but try this

Filter(
   colFuelLogEquipList,
   (
      Len(ComboBox2.Selected.Value) = 0 ||  
      EquipCatChoices.Value in ComboBox2.SelectedItems.Value
   )  &&
   (
      IsBlank(Owned_SearchTxtBox.Text) ||
      (
         Owned_SearchTxtBox.Text in Title ||
         Owned_SearchTxtBox.Text in SerialNoVIN
      )
   )
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

I got nothing but errors with that formula? 

@Patrick-Stamper ,

Just missing a bracket (I thought you might have spotted it) - try now.

Sorry, didn't catch that. Added the bracket, but gallery still does not load?

@Patrick-Stamper ,

Do you mean no errors, but no data ? Please have a look at the logic as I based it on what you posted.

Yes, that is correct. I have no errors and it is not showing any data. I am backtracking everything right now to see where there might be a flaw. What would you like to see to narrow down some things?

Would it be easier to get on a Teams Meeting?

Hi @Patrick-Stamper ,

This logic

Filter(
   colFuelLogEquipList,
   (
      Len(ComboBox2.Selected.Value) = 0 ||  
      EquipCatChoices.Value in ComboBox2.SelectedItems.Value
   )  &&
   (
      IsBlank(Owned_SearchTxtBox.Text) ||
      (
         Owned_SearchTxtBox.Text in Title ||
         Owned_SearchTxtBox.Text in SerialNoVIN
      )
   )
)

looks for two things

  • Either ComboBox2 is blank (all items will be shown) or it will filter on all items selected being in EquipCatChoices AND
  • Either SearchText is blank (all items will be shown) or the test entered is in Title or SerialNoVIN

    If they are both blank, it should show all items, so you need to make sure something is in your collection

NOTE - I will be offline now for some time.

That is what happened. Some how my entire collection disappeared. Guess I am starting over....😕 Thanks for your help. What would you say is the fastest way to create a collection based off of either submitting a new form to a sharepoint list or collecting the entire sharepoint list into a collection?

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

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