Skip to main content

SinglePoint - Query Address Data

  • What is it? In addition to the UPRN and Label of a property you may need to capture some other detail on the property such PAON, SAON, Street, Town, Postcode, County or USRN. This formula can be used to query SinglePoint for that information and save it in the form.

Setup

The formula requires integration with SinglePoint to be configured. This can be done under Settings > Integrations > SinglePoint.

Inputs

This formula has two settings the URPN of the property and the data to return. The return options are:

  • Primary Address (PAON)
  • Secondary Address (SAON)
  • Street
  • Town
  • Postcode
  • County
  • USRN

Return values

ValueDescription
stringThe value of the selected address data
not-foundIf the address data is retrieved from SinglePoint but the requested address data is not set or is empty
[empty string]If there is a problem contacting SinglePoint

Note: return values are case sensitive

Formula Logic

  1. A new instance of SinglePointAddressHydrator is created and the method getAddressFromUPRN is called using the UPRN input. If an exception occurs at this point an empty string is returned.

  2. If the Return option is Primary Address (PAON) the method getPaon is returned if its value is not empty.

  3. If the Return option is Secondary Address (SAON) the method getSaon is returned if its value is not empty.

  4. If the Return option is Street the method getStreet is returned if its value is not empty.

  5. If the Return option is Town the method getTown is returned if its value is not empty, if it is empty the method getPostTown is returned if its value is not empty.

  6. If the Return option is Postcode the method getPostcode is returned if its value is not empty.

  7. If the Return option is County the method getAdministrativeArea is returned if its value is not empty.

  8. If the Return option is USRN the method getUsrn is returned if its value is not empty.

  9. If the formula hasn't already returned not-found is returned.