cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cwebb365
Level 10

Mobile app only loading one collection

So I have a Powerapp that I'm working on setting up offline mode for. I have an onStart that does two clearcollects() for 2 collections taking in 2 sql tables. This works fine in the desktop preview, but when I publish to mobile and try, the first collection and screen works fine. But soon as I go to the second screen I get nothing.

 

No matter what I do. I tried setting the 2nd screen gallery to just show the collection, no filters etc. and it still doesn't load. Added a refresh button to load the collection, notta. It's like there is only allowed to be one collection on the mobile app. 

 

I have shut down the app, cleared cache etc. I'm stumped... lol.

 

Anyone know of a limitation here or know of some gotcha I need to do to get this working?  Thanks!

17 REPLIES 17
KroonOfficeSol
Level 10

Re: Mobile app only loading one collection

@cwebb365

 

This is not a limition thing. I have apps which loads 5-6 collection at the start.

 

What you could do is place the clearcollect in het .OnVisible attribute off the screen. Surround it by a If() formula, with a condition on a local variable, which you set to true after the clearcollect()'s. Try if it works then.

 

If still not the case try to put the first collection first and run again. See if the first is loaded, both are loaded or none is loaded. If not both there you have an error in the formula for sure. Then post your formula.

 

Hope this helps.

 

Paul

cwebb365
Level 10

Re: Mobile app only loading one collection

Same issue, it's just mobile that does it. Just switched it, I've had button clicks populate and show it, nothing seems to work.... Gonna try a new gallery on the first screen just to see if it's something with the screen. 

cwebb365
Level 10

Re: Mobile app only loading one collection

Nope, new gallery on same start screen, one populates and not the other. Must be something with my source, gonna try another table and collection I guess. Just doesn't make sense why it works on preview but not the mobile device lol. 

KroonOfficeSol
Level 10

Re: Mobile app only loading one collection

Do this test.

Add 2 labels and two buttons. On each button a clearcollect() and on each label a CountRows(Collection)

Labels should be more then one after button clicked.

At least you will see where the error is.
cwebb365
Level 10

Re: Mobile app only loading one collection

Returns 0 on the other table, no matter what I do that table collection won't load in mobile lol....this is annoying. I brought over a 2nd collection of another sql table and it works fine, ,it's just this one sql connect to this particular table. It's only 3 columns and has a primary key and similar data to the other tables that's why it doesn't really make much sense. 

 

Going to setup another connection and see if that helps. 

cwebb365
Level 10

Re: Mobile app only loading one collection

Welp, that worked, I guess there was something with the connection that caused it. I created a new connection to the same table and used it in my app and the collection is now populating in mobile and web preview. 

 

I guess I updated the ID identity column to private key and maybe the connection never updated the schema or something, but it was just odd that it would work on preview but not mobile is what was throwing me off. 

 

Anyway, thanks for the idea's all!

cwebb365
Level 10

Re: Mobile app only loading one collection

Aaaaand going back to the connection from the gallery i had that wasn't working originally, i did a refresh on it and now the orginal works.... the fun parts of PowerApps lol.....

cwebb365
Level 10

Re: Mobile app only loading one collection

Sorry for the spam posts but It's doing it again, went back to clean up everything and now it's not doing it again on mobile, even tried another connection thinking that would fix it again and now it's not... this is brutal, No reason for this lol!

KroonOfficeSol
Level 10

Re: Mobile app only loading one collection

@cwebb365

 

When there is this kind off problems I always do error tracking by going over all little steps which are happening in the proces, knowing the main connection, app connection, etc. Maybe you can do the following to see wether all the components are working.

 

  • Try to create another app, connect to the datasources, add in the buttons and CountRows and see if it works then for you to see if the problem is in the app.
  • Could be something wrong in the main connection. Remove the connection to your source entirely from the connection tab in the PowerApps admin screen (so not only the connection in the app, but on your enviroment). Then reconnect to it and see if it then works.

Succes.

 

Paul

 

 

 

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (6,183)