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

So I have my collection back and it will not work with my formula nor yours in the Items field to create a filter? A little stumped on that one..🤔

HI @Patrick-Stamper ,

Please define "will not work" -

  • Are there any errors - if not
  • Do you get data with nothing in either the drop-down or the combo box  - if not put CountRows(colFuelLogEquipList) on a Label and see if you have data.
  • If you get data above, what happens when you put input in each ?

I finally got it to work with my original formula. I had to basically clear out every collection, save, refresh and redo all my collections over again. I appreciate your help with this. Now I am kind of stuck trying to figure out why one of my "New" forms will not submit, but it works fine in another? Randy Hayes actually me with it originally. 

//Button.OnSelect
UpdateContext({locShowSpinner: true});
If(Owned_AddNewEquipForm.Valid, Exit(false),
UpdateContext({newEquipPhoto: Substitute(JSON(UploadedImage5.Image,IncludeBinaryData),"""", "")});
SubmitForm(Owned_AddNewEquipForm); 
ClearCollect(colEquipList, FuelLogEquipmentList));
UpdateContext({locShowSpinner: false});

//Photo Datacard.Update
newEquipPhoto

//Form.OnSuccess
ResetForm(Owned_AddNewEquipForm)&
Navigate(OwnedEquipScanGallery,ScreenTransition.Fade));

 

 

Hi @Patrick-Stamper ,

Your logic seems reversed here to me

If(
   Owned_AddNewEquipForm.Valid, 
   Exit(false),
   UpdateContext(
      {
         newEquipPhoto: 
         Substitute(
            JSON(
               UploadedImage5.Image,
               IncludeBinaryData
            ),
            """", 
            ""
         )
      }
   );
   SubmitForm(Owned_AddNewEquipForm); 
   ClearCollect(
      colEquipList, 
      FuelLogEquipmentList
   )
);

You are saying if the Form is Valid, then exit, should it not be if the Form is not valid

If(
   !Owned_AddNewEquipForm.Valid, 
   Exit(false),
   UpdateContext(

and I am also wondering why you are closing the app on one of those possibilities.

 

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

Helpful resources

Announcements
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.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (5,395)