PostcodeAnywhereServices.getCandidateAddresses

Returns an array of list entries for postCode using the PostcodeAnywhere service provider. Each list entry consists of an array containing two Strings that correspond to the list display value and the list returned value. See FieldList#getDisplayValues(boolean) for more information on list values.

This postcode lookup service provides a two stage user interface:

  1. Show the user a dropdown list of candidate addresses for a postcode using this method
  2. When the user makes a selection from the list, call method #getAddressConstituentParts(String) to get the list details
A valid licence for the PostcodeAnywhere service must be installed.

Javascript example:

 try
 {
   var addresses = PostcodeAnywhereServices.getCandidateAddresses(postcode);
   if (addresses.length == 0)
   {
     event.owner.addErrorMessage("Invalid postcode. Please enter a valid postcode");
   }
   else
   {
     var list = fields.ADDRESSES.createCustomList();
     for each (var address in addresses)
     {
       list.add(address[0], address[1]);
     }
     fields.ADDRESSES.fieldControl.show();
   }
 }
 catch (e)
 {
   event.owner.addErrorMessage(e.javaException.message);
 }
 

returns UNKNOWNjava.lang.String[][]

Parameters

java.lang.String  postCode,