cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

Selecting field to read from a collection

I am working on a canvas app which displays about a dozen fields from a SharePoint list of over 750 items (it will not exceed 1000).  The list contains over 50 fields and the app takes about a minute to load the data, so I am looking for a more efficient means to read the list into a collection.  It occured to me that maybe by limiting the fields to read, performance might improve.  Is this a valid assumption?

 

If the assumption is true,  I was hoping ClearCollect(Showcolumns(datasource, field1, field2)) would work but it appears ShowColumns works on tables but not data sources.  I'm now considering loading a data table which does allow me to limit the columns.

 

Does anyone have suggestions how to best limit the data read?  should I be looking for other means to improve performance?

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Super User
Super User

@SteveFeldman 

That load time seems odd for just loading in a collection, there maybe other reasons for you're slowness? Eg, if you have screens that reference other screens and these other screens have many controls then all related screens must load onstart. Thi said can slow load time and there are other things that can slow your app down as well.

 

ShowColumns definitely works on datasources like SharePoint because I've used it in the past. Your formula should be more like 

 

ClearCollect( yourCollection, ShowColumns(yourDataSource, Filed1, Field2))

 

There are blog articles on the web explaining how to reduce app slowness which are worth reading if it continues to be an issue.

View solution in original post

Dual Super User
Dual Super User

@SteveFeldman 

 

You are right. Limiting the columns with ShowColumns will improve the performance when we wrap this function while retrieving the data. 

 

If you are displaying data in a gallery, then you can wrap ShowColumns function around your data source.

 

Example:

ShowColumns(<Your SharePoint List>,"ID","Title")   - Note column names are within double quotes. You can see them in the intelligence.

 

Regards

Krishna Rachakonda

If this reply helped you to solve the issue, please mark the post as Accepted SolutionMarking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.

 

View solution in original post

3 REPLIES 3
Super User
Super User

@SteveFeldman 

That load time seems odd for just loading in a collection, there maybe other reasons for you're slowness? Eg, if you have screens that reference other screens and these other screens have many controls then all related screens must load onstart. Thi said can slow load time and there are other things that can slow your app down as well.

 

ShowColumns definitely works on datasources like SharePoint because I've used it in the past. Your formula should be more like 

 

ClearCollect( yourCollection, ShowColumns(yourDataSource, Filed1, Field2))

 

There are blog articles on the web explaining how to reduce app slowness which are worth reading if it continues to be an issue.

View solution in original post

Dual Super User
Dual Super User

@SteveFeldman 

 

You are right. Limiting the columns with ShowColumns will improve the performance when we wrap this function while retrieving the data. 

 

If you are displaying data in a gallery, then you can wrap ShowColumns function around your data source.

 

Example:

ShowColumns(<Your SharePoint List>,"ID","Title")   - Note column names are within double quotes. You can see them in the intelligence.

 

Regards

Krishna Rachakonda

If this reply helped you to solve the issue, please mark the post as Accepted SolutionMarking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.

 

View solution in original post

Frequent Visitor

Thank you for confirming my assumptions.  From your replies, I created a blank canvas app, and used a button to perform the ClearCollect function.  The results of this test work as you stated.   I am now looking into the field names call in my original app as i now suspect I am missing some fields or they are misspelled.  There are a couple of managed metadata fields, which also be having an impact on the functions.

 

Thank you 

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (34,566)