cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Land of Confusion

I have got a nice functional app, but as time goes on, I am finding that I need to improve an issue. I need to be able to lookup cities and states. I currently have a list, but the list is fast approaching the 5000 item mark. Is there a common SECURE place to get cities - states? And if so, please provide general information on how to..... Happy New Year everyone and thanks in advance for any and all responses. I also apologize if this question is elementary, I am not a developer and I am learning everyday.
1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Land of Confusion

Hi TT You can download the zipcode database from http://federalgovernmentzipcodes.us/ for free as an excel spreadsheet csv file. It contains almost 43,000 items. If you don't care about the zip codes you can import it into Excel remove the duplicates. That filters it down to 29,787 cities and states. Split it into two tables and import it into Powerapps using the Static Data option. This option is limited to 15000 rows.
6 REPLIES 6
DanielWilliams
Level: Powered On

Re: Land of Confusion

Good afternoon,

Can you provide a little more details? Are you wanting the entry to auto populate or provide a list of location or just a link to a specific URL that does that?

Super User
Super User

Re: Land of Confusion

Hi TT You can download the zipcode database from http://federalgovernmentzipcodes.us/ for free as an excel spreadsheet csv file. It contains almost 43,000 items. If you don't care about the zip codes you can import it into Excel remove the duplicates. That filters it down to 29,787 cities and states. Split it into two tables and import it into Powerapps using the Static Data option. This option is limited to 15000 rows.
Super User
Super User

Re: Land of Confusion

Hi @TerrificTerri,

Take a look at my new blog post inspired by your question. Automatically Prefil City and State from Zip Codes.  

Community Support Team
Community Support Team

Re: Land of Confusion

HI @TerrificTerri,

Could you please share a bit more about your scenario?

How do you retrieve the Cities and States value from your data source?

I suppose that you have recognized that you may face a Delegation issue with the LookUp formula you used within you app, is it true?

If the Data source you used is a Delegable data source, and the LookUp formula you used is also Delegated within your app, you don't need to care about the Delegation issue.

More details about the Delegation in PowerApps, please check the following article:

Delegation 

If the Data source you used is not a Delegable data source, or the formula you used could not be delegated within your app, you could not delegate the data processing to your data source, instead of, you could only process your data locally. In addition, you could only process 500 records at most in default (you could consider change the Non-delegable limits to maximum value -- 2000).

So please make sure your Data source is a Delegable data source, and you use a Delegated formula within your app  based on the following article:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/delegation-list

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Super User
Super User

Re: Land of Confusion

Hi @v-xida-msft,

I figured out a way to avoid delegation and access all the cities and states in the USA (over 42,000) without a delegation issue.  Check out my blog post from yesterday.

Re: Land of Confusion

Thanks everyone!  Some great ideas and all of them seem to work.