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

Odd with and without Distinct

This started with me building cascaded drop-down based on data in SharePoint list and using Distinct to only get unique records.

Seemed to work fine but when I added records in the SharePoint list the new records did no display in power-apps drop-down.

I'm using Sort(Distinct(Domains,DomainArea),Result,Ascending) in Items.

Result only showing records from when I first initiated the table in powernaps no new records.

Then I created a gallery and connected the SharePoint list to test around.

Same phenomena in the gallery.

Sort(Distinct(Domains,DomainArea),Result,Ascending) in Items I only see the old records.

But if I remove Distinct using Sort(Domains,DomainArea,Ascending) I also get the newly added records in the galley view.

Adding Distinct again removed the newly added records.

What am I missing, is there some kind of cache that the needs to be reset?

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
mdevaney
Super User
Super User

@powow 

The DISTINCT function cannot be delegated.  That means it only looks at the first 500 rows in the table.  There's no way around it except to use different functions all together. 

 

Here's a complete listing of all the functions that can be delegated:

https://powerapps.microsoft.com/en-us/blog/sharepoint-delegation-improvements/

 

Note: You can increase the delegation limit to 2,000 rows in Advanced Settings.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

2 REPLIES 2
mdevaney
Super User
Super User

@powow 

The DISTINCT function cannot be delegated.  That means it only looks at the first 500 rows in the table.  There's no way around it except to use different functions all together. 

 

Here's a complete listing of all the functions that can be delegated:

https://powerapps.microsoft.com/en-us/blog/sharepoint-delegation-improvements/

 

Note: You can increase the delegation limit to 2,000 rows in Advanced Settings.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

powow
Frequent Visitor

Thank you!

You made my day!

I increased to 1000 and voila 😊

Earlier when I have used functions that are delegation dependent I have got a warning but not this time.

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PWREduCon768x460.png

Join us at PWR EduCon - A Power Platform Conference

Learn from the top Power BI, Power Apps, Power Automate & Power Virtual Agents experts!

Top Solution Authors
Top Kudoed Authors
Users online (3,761)