SOLVED

PowerApps Canvas Template on Training - Navigation Question

Deleted
Not applicable

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.pwrapps training canvas app template.PNG

  1. The navigation section seems to render the page names in the left-hand nav from a data source "Lessons" which yields "Welcome", "About", "Basics", etc. I cannot locate "Lessons" anywhere. There are no connected data sources and the "Collections and Variables" screen has no reference to "Lessons" so where are the left-hand nav titles coming from? From the screenshot (GalleryLessons_1 selected) you can see Filter uses "Lessons" but it cannot be found (It's not a variable either).pwrapps canvas tutorial formula nav.PNG
  2. There is a "DataTable1" on the  "Collections and Variables" screen which contains one column for the lesson number. In cases where I do NOT require an external data source, can I use a two-column data table as a data source? 

  3. What are the advantages to storing the navigation titles on a separate screen like "Collections and Variables"?
7 Replies
Where is this training template to look at? Lessons has to most likley be a collection but it could be a Local variable too. I'd need to look at the app to tell for sure.
As for 2. you should create collections then read off that, which can include 2 columns or whatever you want and it's local to the app. Data table is just a rendering of a data source.
3. Dynamic updates via data source instead of manually editing the app.

Thanks @ChrisWebbTech for the response. 

pwrapps training canvas app template.PNG
The tutorial is a template avail within the PowerApps creation tool in the browser. If you start from a template and select the "PowerApps Training" canvas app, you will be able to access it (pls see the attached screenshot). 

"Lessons" cannot be found as a variable or global variable in the View > Variables menu. I simply can't find it, yet it is being used to render the LH nav screen/page names.

 

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.

You 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?

best response
Solution
Collection 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=%...

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/

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. 

Depends 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.
1 best response

Accepted Solutions
best response
Solution
Collection 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=%...

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/

View solution in original post