Address input in a power app showing addressses

Address Input in Power Apps

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.

Address Input in Power Apps 1

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.

Address Input in Power Apps

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.

Address Input in Power Apps 2

Now you can use the Address Input in Power Apps to get all the separate parts of your address.

Address Input in Power Apps 3

The properties that you will be able to get out of the control are:

  • Building number
  • Country
  • Countrycode
  • CountryCodeISO3
  • CountrySecondarySubdivision
  • CountrySubdivision
  • CountrySubdivisionName
  • CountryTertiarySubdivision
  • CrossStreet
  • ExtendedPostalCode
  • FreeformAddress
  • LocalName
  • Municipality
  • MunicipalitySubDivision
  • PostalCode
  • RouteNumbers
  • SearchResultJson
  • Street
  • StreetName
  • StreetNameAndNumber
  • StreetNumber
  • UserInput
  • SelectedLatitude
  • SelectedLongitude
Address Input in Power Apps 4

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.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: