Forum Discussion
Deleted
Feb 15, 2019PowerApps Canvas Template on Training - Navigation Question
I am creating an app from the "PowerApps Training" template (canvas app) and have completed the tutorial and reviewed the formulas, code, etc. However, several items are confusing. The navi...
- Feb 15, 2019Collection are nothing more than local datasource, or basically a database table. You don't have 500 record limits in filtering etc. either, but you do have 500 record limits from datasources in single calls, you'll start learning about this later and it's a pretty big deal if you are messing with large data tables. It's called Delegation.
https://web.powerapps.com/webplayer/app?source=portal&screenColor=rgba(37%2c+62%2c+143%2c+1)&appId=%2fproviders%2fMicrosoft.PowerApps%2fapps%2fa3cd4303-e143-44e1-825b-eac37c8988e7&environment-name=Default-77d5a8ac-8982-46ce-a226-d2b20ac8cbaa
It's a hard thing to wrap your head around, but bottom line is SharePoint has the most issues with delegation due to limited filters that SharePoint can handle, vs. a sql datasource for example which can handle all the delegation issues / filters on the server side.
Anyway, don't want to get in too much, but Collections are nice, especially to cache and work off that data, you can easily use a command like ClearCollect(LocalCollectionname,'dbo.datatable') and quickly create a collection, and then manipulate that locally quicker than making multiple calls to an online datasource.
Here is a good article going over that as well as making parallel calls etc.
https://powerapps.microsoft.com/en-us/blog/performance-considerations-with-powerapps/
Feb 15, 2019
Not sure where you are looking but Lessons is a collection like I thought it was, if you click View > Collections it's right there.
Deleted
Feb 15, 2019You are correct. I am just now learning about collections.
The "Lessons" collection is a great example of using data from a collection that is setup to never change. Is there a way I can edit an existing collection like this to customize for my needs?
- Feb 15, 2019Collection are nothing more than local datasource, or basically a database table. You don't have 500 record limits in filtering etc. either, but you do have 500 record limits from datasources in single calls, you'll start learning about this later and it's a pretty big deal if you are messing with large data tables. It's called Delegation.
https://web.powerapps.com/webplayer/app?source=portal&screenColor=rgba(37%2c+62%2c+143%2c+1)&appId=%2fproviders%2fMicrosoft.PowerApps%2fapps%2fa3cd4303-e143-44e1-825b-eac37c8988e7&environment-name=Default-77d5a8ac-8982-46ce-a226-d2b20ac8cbaa
It's a hard thing to wrap your head around, but bottom line is SharePoint has the most issues with delegation due to limited filters that SharePoint can handle, vs. a sql datasource for example which can handle all the delegation issues / filters on the server side.
Anyway, don't want to get in too much, but Collections are nice, especially to cache and work off that data, you can easily use a command like ClearCollect(LocalCollectionname,'dbo.datatable') and quickly create a collection, and then manipulate that locally quicker than making multiple calls to an online datasource.
Here is a good article going over that as well as making parallel calls etc.
https://powerapps.microsoft.com/en-us/blog/performance-considerations-with-powerapps/- DeletedFeb 15, 2019
Thanks for the great information! I understand database tables and I'd like to use a collection to store data that never changes.
So let's say I create new collection from SP List attached to screen object > onVisible:
Collect(SPProcessScenarios, ProcessScenarios)Now I have a collection "SPProcessScenarios" that I can "query" to return the results and render on a screen. How could I render the data from the collection (e.g., col 1 and col 2) in a foreach type scenario? is there a way to do that? I suppose using a gallery is the solution.
- Feb 15, 2019Depends on the query. Loops are slow. But depending on the where clause ‘sql’. So if you wanted to filter for col b for values greater than 100 for example you put that into say a gallery items property has filter(collection1,colb > 100)
Or you can have a search box so you could use search(collection1,textbox1.text,”Colb”)
Lookup() for single records to put on labels etc.
If you had to use a loop it’s the forall(collection) do x function.