Data in collections not appearing in Power Apps

Pieter VeenstraMicrosoft 3652 years ago52 Views

Have you ever found that data in collections not appearing in Power Apps? Are you displaying data in collections from a data source while you haven’t used this data source directly in your UI controls?

Explicit column selection

If you have found that your galleries aren’t loading data then you might have fallen for the issues related to the Explicit column selection feature.

Data in collections not appearing in Power Apps - Explicit column selection

So what does this feature do?

When you load your data sources in Poweer apps you might expect that all this data gets loaded. When you read data sources that only contain real data then this might be ok, but just imagine for one moment a data source like Dataverse. how many of those internal GUID fields can you have?

All those fields put your app under pressure, hence Microsoft decided to only load the fields that are actually used. This is a good idea!

When things go wrong!

In my app on start code I could for example use my data source files, and then filter the files by a certain location. This would be something like this:

ClearCollect(colVisibleFiles, Sort(Filter(Files, Path = varCurrentLocationInLibrary), IsFolder,Descending));

Now when I use the colVisibleFiles collection to display my files in a gallery I will actually see that the number of records in my gallery matches the number of records in my collection however, the data for the columns will not be displayed.

So how do we solve this?

We will have to use the ShowColumns function.

Something like the following lines will now make the columns explicitly used and therefore when I use the colVisibleFiles my fields will appear.

ClearCollect(colVisibleFiles, Sort(Filter(Files, Path = varCurrentLocationInLibrary), IsFolder,Descending));
ShowColumns(colVisibleFiles, "shp_filenamewithextension", "hyb_modified","modifiedby","hyb_location", "hyb_id", "hyb_fullpath");

Continue Reading Pieter Veenstra’s Article on their blog

Data in collections not appearing in Power Apps

Have you ever found that data in collections not appearing in Power Apps? Are you displaying data in collections from a data source while you haven’t used

Blog Syndicated with Pieter Veenstra’s Permission

0 Votes: 0 Upvotes, 0 Downvotes (0 Points)

Leave a reply

Join Us
  • X Network2.1K
  • LinkedIn3.8k
  • Bluesky0.5K
Support The Site
Events
April 2025
MTWTFSS
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30     
« Mar   May »
Follow
Sign In/Sign Up Sidebar Search
Popular Now
Loading

Signing-in 3 seconds...

Signing-up 3 seconds...