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

Distinct not working due to delegation issue with Sharepoint list in my power app

I have 2 combo boxes. 
Box 1 - Distinct list of States
Box 2 - Distinct list of Cities based on Box 1 selection

The combo box selections are used to filter my gallery items.

I had this working great using Distinct so that States and Cities weren't listed multiple times. However, now my db is over 2k and Distinct is not pulling in all the locations.

Does anyone have any other ideas on how to do this? 
Thanks

3 REPLIES 3
mdevaney
Super User
Super User

@rachel007 
It's a little bit hard to picture exactly what your app looks like with no code or sample data provided but... do you have over 2,000 records for any state?  If your answer is 'no' you do not have to be concerned about delegation.

 

Use this code in the Items property of your dropdown for cities.

Distinct(Filter(your_cities_list, State=ComboBox_State.Selected.Value), City)

 

 

---
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."

 

KranthiTupakula
Responsive Resident
Responsive Resident

@rachel007 

 

Hello,

 

If i understood your question right,

 

Please follow this post https://powerusers.microsoft.com/t5/Building-Power-Apps/Combo-Box-with-Distinct-Lookup-Values/m-p/11...

 

if this doesn't work please let me know if you are available for a quick screenshare.

 

_________

If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

@mdevaney Your code is exactly what I was using. There are over 2000 records. The person submits a form and part of the form includes city and state. City and State are my drop down filters for my gallery of items. If someone enters a new city at 2001, it won't show up as an option. Thank you for you suggestions. I should have added my code and more details.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (1,357)