Address Formatting Functions

Calculated attribute expressions can be written using the following available functions.

Note: This set of functions each return a basic, formatted address suitable for rendering in Web UI and/or for use in mailing. These functions should only be applied to calculated attributes that are valid on objects (Data Container or Entities) found in the Address Component Model. If the object in question is not included in the Address Component Model, these functions will return an empty string. Each function uses different address fields when calculating the formatted address.

Function

Parameters

Description

SimpleAddressFormat

([output])

Returns a formatted address based on Standardized or Input address fields. If the Standardized Formatted Address field has a value, the Standardized fields are used for formatting. If the Standardized Formatted Address field is empty, the Input address fields are used.

The optional [output] parameter determines if the formatted address is output with multiple lines (parameter value 'multi') or as a single line (parameter value 'single').

[output] defaults to 'multi'.

StandardizedAddressFormat

([output])

Returns formatted addresses based on Standardized address fields only. If the Standardized Formatted Address field has a value, the Standardized fields are used for formatting. If the Standardized Formatted Address field is empty, an empty string is returned.

The optional [output] parameter determines if the formatted address is output with multiple lines (parameter value 'multi') or as a single line (parameter value 'single').

[output] defaults to 'multi'.

InputAddressFormat

([output])

Returns a formatted address based on Input address fields only. Standardized fields are ignored.

The optional [output] parameter determines if the formatted address is output with multiple lines (parameter value 'multi') or as a single line (parameter value 'single').

[output] defaults to 'multi'.

If the formatted address uses the Input Address fields and if no address information for the street level is available in those fields, the text string [no street] will automatically be added to the formatted address. This is used to explicitly indicate that street information is missing.

For example, in the image below the formatted address is missing data for street number and name.

The following input fields are used in the calculation of the formatted address:

  • Input Address Line
  • Input Address 1
  • Input Address 2
  • Input Address 3
  • Input Address 4
  • Input Street
  • Input Street Name
  • Input Street Number
  • Input Dependent Locality
  • Input Dependent Street
  • Input Building
  • Input Subbuilding
  • Input Organization
  • Input PostBox
  • Input City
  • Input Country
  • Input Country ISO
  • Input Zip
  • Input County
  • Input State

The following standardized fields are used in the calculation of the formatted address:

  • Standardized Formatted Address
  • Standardized Country
  • Standardized Country ISO Code

Note: Configuring all of these fields is not mandatory. These functions will only pull data from fields that have been mapped to the component model, and overlook any that are unmapped. Likewise, each formatted address will only display data from fields that actually have content to provide it with.