web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Powerapps collection n...
Power Apps
Unanswered

Powerapps collection not fetching data

(0) ShareShare
ReportReport
Posted on by 4

Hi, 

I have a very basic problem that I can't seem to solve.

I am trying to build a very simple org chart, and have a dropdown filter for a gallery.  I would like to create a collection so that I can display all results in the filter.  I am trying to follow this video here:https://www.youtube.com/watch?v=kLGglidmPxg and I'm at the stage where I need to create the collection, which seems easy enough:

 

For the screen, whilst set to OnVisible, I add: ClearCollect(collectEmployees, Distinct(Table1, AREA))

Employees = this will be the name of my collection

Distinct(Table1, AREA) = Table1 is my gallery, and they are currently filtered by the AREA field, and the dropdown filter uses 'Distinct(Table1, AREA)' to ensure only a single instance of each AREA shows in the dropdown.

 

When I check to see what results are being fetched with that collection, it returns 'we didn't find any data'.collectEmployees.png

 

As far as I can tell, it should populate the collection with distinct values from the AREA field of the data source...

 

I know I'm doing something very basic wrong, but can't figure it out.

 

 

Categories:
  • cwebb365 Profile Picture
    3,334 Most Valuable Professional on at

    If you need to pull from a gallery you need to reference gallery.allitems in the first part of distinct. However keep in mind distinct is not delegable so if you ever envision the gallery or the items in the gallery to exceed 500 default or 2000 items you run the chance of not getting all the distinct values as it will only pull them up to that amount based on the app settings so any values over the first set of those will be missing.  

  • chrisjames2678 Profile Picture
    4 on at

    I don't think I want to pull from the gallery as such - I want to pull from the list of distinct items for a single field.  So, for example, I have 150 unique rows in my data, but I only have 10x unique entries for the field "AREA" so I assumed that I need the collection to hold that distinct list only (as per the video around 10:22 in).

  • cwebb365 Profile Picture
    3,334 Most Valuable Professional on at

    That’s fine and all. You just have to make sure your list you are getting distinct values from never exceeds your delegation setting which is 500 by default or 2000 max. Otherwise you will start to miss distinct values since it will only evaluate up to those amounts since distinct() isn’t delegable.  You just have to keep that in mind when using it.  

  • chrisjames2678 Profile Picture
    4 on at

    Ok, thanks for that.  I'll keep it in mind.  I'm still not clear why the collection is empty though and it isn't returning anything at all?!

  • cwebb365 Profile Picture
    3,334 Most Valuable Professional on at

    Try putting in what you have for your items property in your gallery In the distinct(). 

    if I recall can be like distinct(galitemsprop.Area) 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 411 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 338

#3
WarrenBelz Profile Picture

WarrenBelz 256 Most Valuable Professional

Last 30 days Overall leaderboard