I'm still trying to get this sorted out. I can't get any collections from sql data sources to populate on mobile at all. I've created blank fresh apps, trying different tables etc. Can't quite figure it out, works on web, but not mobile, starting to wonder if it's a bug. Need to have someone else test for me on their phone to see if something is up with my phone I guess.
Doing a collection from SharePoint data works fine on mobile. Gallery straight to sql works fine, but soon as I point a gallery to a sql collection no bueno.
Ok, so just another note, this isn't related to Mobile only, the web interface also doesn't do the colleciton from sql. The preview inside the app while building the app works, along with hitting play to preview works as well. If I actually run the app or on mobile both do not render the sql collections.
I'm literally just creating a blank app. Adding a gallery. Connect it to my azure sql table.
This works fine.
So step 2 is just going to OnStart, OnVisable, I've tried both. I've even tried adding this to a button to click to process but.
Then setting the gallery to pull from localtestdata.
Works from preview, not from running app.
Do the same thing with SharePoint source on the clearcollect and works fine.
Ok, so I made a little bit of progress but still seems buggy to me.
If I add a gallery with a direct pull from the sql table first, then do the collection using that same sql table, it works fine and will query and display from the collection to another gallery. Otherwise if i remove the gallery with the direct sql call collection stops working.
I got it to work stand alone for a bit then it started acting up again, it's almost like it's caching the collection on the back end and not repopulating it when you call a clearcollect, just doesn't ping the database and doesn't refresh the gallery. I even added a new item in the DB and the clear collect doesn't pull the latest data in unless I have an already existing gallery in the app pulling directly from the database/table then it works.
I'm trying to run offline mode is my goal here and why I'm trying to just take the data into collections locally, but I think my approach is wrong since it seems like Powerapps alone can cache the data when offline I just need to write updates done on the device to the device and update later.
Anyway, still plucking around.
So only thing I can continue to consistently get to work is by having a hidden gallery on a screen using the sqldata with an if(connection.connected,'datasource') so that the "Collection" works, which populates the offline file. This is working, but I'm basically having to do double db calls, but at least it works to populate my collection and offline file this way. Soon as I remove that gallery, I get no collection population when online :(.
I went ahead and put a ticket into Microsoft because this shouldn't be acting like this, it's pretty straight forward and obviously just not working. I've tried creating new database tables, with different columns etc. and It's just completly random on working.
I'll post back here if I can get a resolution. thanks for the ideas.
Our collections are not fully working. The collections (using ClearCollect) worked smoothly on Monday morning.
By Monday afternoon that same day, ClearCollect only partially collects from our SharePoint source list.
P.S. Included a screenshot of the error.
Fill out a quick form to claim your user group badge now!
Find out where you can attend!
Features releasing from October 2019 through March 2020
Learn how to build the business apps that you need.