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 III
Super User III

@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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Did you miss the call? Check out the recording here!

Top Solution Authors
Top Kudoed Authors
Users online (30,594)