When you app needs users to input addresses, you can now use the Address input control.
Address Input Control
While I’m writing this post the address Input control is still in preview, but the control already works quite well so it’s worth writing a blog post about.
If you hadn’t found the Address Input control yet, I wouldn’t be surprised. It is all the way at the bottom of the list in the input menu.
Adding the Address Input control
Once the control had been added there are a couple of important settings. The first one is the Country set.
Within the Address lookup documentation we are given a small clue what we should set the Country set to.
Comma-separated list of countries to constrain the address suggestions to, in ISO 3166 alpha-2 country codes. For example, US, FR, KW
The full list of ISO 3166 Alpha-2 codes can be found on the ISO 3166 Wikipedia page. So quite quickly I found that the United Kingdom uses GB.
Now you can type an address and the Power App will suggest options. Note that this control is still in preview so it may not find all addresses as well as you would hope for.
I noticed for example that the control doesn’t really like you type the postcode. the numbers in the postcode will be used to search in the street name and number first.
Now you can use the Address Input in Power Apps to get all the separate parts of your address.
The properties that you will be able to get out of the control are:
- Building number
Some of these fields are used in all locations and some of these are only available within certain locations.
Uses for the Address Input control
The obvious use for the control is of course for a user to enter an address. But if you have an address in a database somewhere you could also use this control to get the longitude and latitude for the address and then maybe use that to display a map at the right location.
You could also use the control if you have an address and you want to get to the separate elements of the address.
so even though the initial use may be user input you could also use it to get your app to understand an address.
10 thoughts on “Address Input in Power Apps”
Hi! Do you know how to get the longitude and latitude from the Address Input control when using an address database to show the location right away? Now I have to click on the address before the map updates..
The following properties should give you what you are looking for:
What’s your experience of Address input in terms of practical usability?
I have been trying to find addresses in Yorkshire and with the GB ISO code it returns addresses in London / South East and Northern Ireland but not the ones I’m looking for
When I use with ‘search within radius’ with Latitude / Longitude / meter radius I don’t get any suggestions at all
It feels like there may be a Northern England dataset missing…
I just wondered what your experience has been?
HI Chris, I just tried it and I was missing quite a few addresses as well.
Thanks for checking Pieter. I will raise with Microsoft
Let me know if you find out more.
Hi again Pieter. I raised with Microsoft. They accept there is an issue with addresses from some regions in the UK and have passed this to the product development team. As this is still in preview, unfortunately there is no resolution date, Chris
Thanks for letting me know. This has been in preview for quite a while now. Sometimes it feels like new features stay within preview forever
I want to make country set dynamic how do i do that
Do you mean within the Address Input control? You could try set the property to a variable and then set the variable to whatever value is required.