Placeholder

Customer Forum

Creating an Address Picklist for Companies with multiple addresses.

Sam (Workbooks Online) Posted: 2018-02-06 11:19

If an Organisation has multiple sites or divisions you may want to associate an Employee with a specific site rather than the Organisation’s Head Office address. Multiple Addresses can be associated to an Organisation by either creating a new Organisation Record for each site and creating a Relationship from the Site to the Head Office or by using the Contact Details Tab on the Organisation Record. 

In this example we will be focusing on using the Contact Details of the Organisation Record, this allows you to store multiple addresses against a single Organisation Record, on an Employees Person Record we will be able to choose the site that they work at and have that populate an Address Field through the construction of a Dynamic Picklist.

This Forum Post will cover how to create the Report and Fields required to construct the Address Lookup.

2018-02-06_10-55-15.jpg

When building this Dynamic Picklist you are able to output the address as a single multi-line text field as above or break up the address into multiple text fields, for this example we will cover how to output the data as a multi-line text field.

This will not create a relationship from the Person to the Address, it is purely for Reporting Purposes.

Adding the additional Addresses

Additional Addresses are stored on an Organisation Record under the Tab called Contact Details, the Main Address is found on the Main tab of the Organisation:

2018-02-06_10-56-59.jpg

This allows you to name the address site, complete with a full address and contact details, Users with the Mapping Module will also have the ability to show the Map Position for the Organisation.

2018-02-06_11-00-17.jpg

Building the Dynamic Picklist as a single multi-line text field:

We will first need to build a Report based on Organisations and ensure that we include the following columns:

Note

We would recommend naming the Report "Dynamic Picklist - ..." so that Users are aware that this is being used as a part of your configuration and shouldn't be amended.

  • Organisation Name
  • Id
  • Other locations > Street Address
  • Other Locations > Town or City
  • Other Locations > County
  • Other Locations > Postcode/Zipcode
  • Other Locations > Country
  • Other Locations > Location name

You will now need to build a calculated column that will serve as your full address field, to do this use the CONCAT_WS function with the delimiter of ‘,\n’ this will add a comma and then a new line after each of the parameters. You should get something like:

CONCAT_WS(‘,\n’, locations.street_address,locations.town, locations.county_province_state, locations.postcode, locations.country)

Building the Dynamic Picklist

To Begin with we need to Customise People in order to create the required Fields.

From Start > Configuration > Customisation > Record Types > People you will need to create two Fields:

A Multiline Text field that will hold the full address. And a Dynamic Picklist that looks up your newly created Report and is using the Calculated Column as the Display Column.

Additionally you will need to set up:

  1. A constraint of the Employer Form Field is the Employer Id in the Report 
  2. A Field Mapping for the Full Address to map to the Full Address Multiline Text field:

2018-02-06_11-04-18.jpg


Once this has been set up you will need to configure your Person Form Layouts to display where you want them, then you will be able to select from a list of Employer Locations and populate the address.

2018-02-06_11-01-10.jpg