Powersearch Integration Options
Formatting Options
Formatting options follow a field name in brackets:
fieldname(option[=value[;value]...][,option]...)
General options
Applies to the address element fields ORGANISATION through COUNTY.
Option | Abbrev | Values | Description |
---|---|---|---|
CHANGECASE |
CA |
0/1/2 |
Character case |
CHANGECASE values
Value | Description |
---|---|
0 |
lower case |
1 |
UPPER CASE |
2 |
Title Case |
e.g.
STREET(CA=2)
This sequence returns the street name in upper and lower case (i.e. title case)
County options (UK datasets)
These options apply to the address element field COUNTY, and to the county as used in the formatted address ADDR.
Option | Abbrev | Values | Description |
---|---|---|---|
FULLCOUNTYNAME |
FC |
n/a |
Full postal county name (default is the Royal Mail standard abbreviation where one exists) |
ADMINCOUNTYNAME |
AC |
n/a |
Administrative county name |
TRADCOUNTYNAME |
TC |
n/a |
Traditional county name |
Note: these three options are mutually exclusive
e.g.
COUNTY(FC)
This sequence returns the postal county name in it's unabbreviated form.
Postcode options (UK datasets only)
These options apply to the postcode field POSTCODE.
Option | Abbrev | Values | Description |
---|---|---|---|
POSTCODEFORMAT |
PF |
1-12 |
Specify the length of the postcode and incode justification (how many spaces there are between incode and outcode) |
POSTCODEPART |
PP |
1 to 127 |
A bitmap specifying permitted partial postcodes |
POSTCODEFORMAT values
Value | Description |
---|---|
1 |
max 7 characters, incode left justified (Max 1 space) |
2 |
all 7 characters, incode right justified (0/1/2 spaces) |
3 |
max 8 characters, incode left justified (Always 1 space) |
4 |
all 8 characters, incode right justified (Min 1 space) |
Add 8 to any of the above values to add a space between postcode and DPS.
POSTCODEPART values
Value | Description |
---|---|
+1 |
Area code e.g. NW |
+2 |
District code (also known as "outward postcode" or "outcode") e.g. N17 |
+4 |
Sector code e.g. TD6 0 |
+8 |
Sector code + character of postcode ending (not a valid partial postcode) |
+16 |
Full postcode e.g. NW3 2QW |
+32 |
Postcode + 1 character of DPS (not a valid partial postcode) |
+64 |
Postcode + DPS (Delivery Point Suffix) e.g. AB1 0PS1A |
Default = 87 = 64+16+4+2+1
e.g.
POSTCODE(PF=4,PP=16)
This sequence returns only a full postcode (with no DPS), with the incode right justified in an 8 character field.
General address formatting options
The general options are specified in the formatting options as:
ADDR(option[=value[;value]...][,option]...)
Option | Abbrev | Values | Description | Default |
---|---|---|---|---|
CONCATENATE |
CO |
Boolean |
If TRUE, text is concatenated according to the address element options. |
Y |
ELIMINATE |
EL |
Boolean |
If TRUE, text is eliminated according to the address element options. |
N |
CHANGECASE |
CA |
Boolean |
If TRUE, text is formatted according to the address element options. |
Y |
FORCELINES |
FO |
Boolean |
If TRUE, address elements are forced into lines according to the address element options. |
N |
JUSTIFYTOLINE |
JU |
0-12 |
The line number to justify lines down to or 0 if justification is not required. |
0 |
HYPHENATE (not Matchcode Europe or Matchcode Loqate) |
HY |
Boolean |
Hyphenate number ranges found in the building and sub-building names. |
N |
LINECNT |
LC |
1-12 |
The number of address lines. |
7 |
LINELEN |
LL |
See below |
The length(s) of the address lines. |
56 |
LINEDELIMITER |
LD |
See below |
Lists the characters that should be used as delimiter between address lines. |
M |
FIXED |
FI |
Boolean |
Fixed width address lines. |
N |
DOUBLEQUOTE |
DQ |
Boolean |
Enclose fields in double quotes. |
N |
DELIMITER |
DE |
See below |
Lists the characters that should be used as delimiter between address elements concatenated together on one line. |
MS |
LINENO |
LN |
0-11 |
Output only the specified individual address line. |
n/a |
Most of the ADDR general options above are options in the [ADDRESSFORMAT] section of the Address Formatting Configuration File (waf.ini), however FIXED, DOUBLEQUOTE and LINENO are not.
HYPHENATE Values
Hyphenate determines how number ranges within the Royal Mail PAF building name field are formatted.
Value | Description |
---|---|
0 |
No hyphenation, e.g. “10 12” |
1 |
Hyphenate with a dash (-), e.g. “10-12” |
2 |
Hyphenate with a slash (/), e.g. “10/12” |
LINELEN
To specify the same length for all lines use:
ADDR(LL=length)
If different lengths need to be specified for individual lines, you can use the format :
ADDR(LL=lineno:length[;lineno:length]...)
e.g.
ADDR(LC=5,LL=1:20;2:30;3:30;4:30;5:10)
This sequence returns and address field of 5 lines where the first line is a maximum of 10 characters, the next three lines are a maximum of 30 characters and the last line is a maximum of 10 characters.
Delimiters
DELIMITER and LINEDELIMITER may contain any number of the following special characters:
Value | Meaning |
---|---|
M |
Comma |
I |
Semicolon |
N |
Colon |
E |
Equals |
S |
Space |
T |
Tab |
C |
Carriage Return |
L |
Line Feed |
DELIMITER and LINEDELIMITER may also contain quoted literal strings enclosed in quotation marks or apostrophes. These can be embedded in between the special characters above or used by themselves.
Address element options
The following options are specified with a different value for each address element type, using the following form:
ADDR(type=option:value[;option:value]...)
Where type is one of the following address element names:
Address Element Name | Abbrev |
---|---|
ORGANISATION |
ORG |
SUBBUILDING |
SUB |
BUILDINGNAME |
BLD |
BUILDINGNUMBER |
BNO |
DEPSTREET |
DST |
STREET |
STR |
DEPLOCALITY |
DLO |
LOCALITY |
LOC |
POSTTOWN |
TWN |
COUNTY |
CNT |
POSTCODE |
PCD |
The options that can be used in conjunction with the address elements are listed in the following table:
Option | Abbrev | Values | Description |
---|---|---|---|
CONCATENATE |
CO |
0/1/2 |
Controls concatenation of succeeding element to this element |
ELIMINATE |
EL |
0-9 |
Controls elimination of elements from the address. Particularly where space is limited. |
CHANGECASE |
CA |
0/1/2 |
Controls the character case |
FORCELINES |
FO |
0-11 |
Specifies which address line to force each address elements into |
CONCATENATE values
Value | Description |
---|---|
0 |
Never concatenate succeeding elements to this element |
1 |
Always concatenate succeeding elements to this element |
2 |
Concatenate succeeding elements to this element whenever necessary |
ELIMINATE values
Value | Description |
---|---|
0 |
Always discard this element |
1 |
Never remove this element from the address |
2-9 |
Remove this element, whenever necessary. The number can range from 2 to 9 and gives the order of priority - 2=High (remove last), 9=Low (remove first) |
Default: Respectively, 1, 3, 2, 4, 8, 6, 7, 5, 1, 9, 1 for ORGANISATION through POSTCODE. When the general address formatting ELIMINATE option is false, elimination still occurs using the default values.
CHANGECASE values
Value | Description |
---|---|
0 |
lower case |
1 |
UPPER CASE |
2 |
Title Case |
The default is to format all text in title case, except for the posttown and postcode, which will be in upper case.
Locality options (UK datasets only)
The following options are specific to the locality name and are specified using the following form:
ADDR(LOC=option:value[;option:value]...)
Option | Abbrev | Values | Description |
---|---|---|---|
LONDONLOCALITY |
LL |
n/a |
PAF Locality is blank for London, this option provides a London locality name derived from the outward part of the postcode |
This option can be specified in the [ADDRESSFORMAT] section of Address Formatting Configuration File as follows:
Option | waf.ini [ADDRESSFORMAT] |
---|---|
LOCALITY=LONDONLOCALITY |
LONDONLOCALITY=Y |
County options (UK datasets only)
The following options are specific to the county name and are specified using the following form:
ADDR(CNT=option:value[;option:value]...)
The options for formatting the county within the ADDR field are the same as the options for the COUNTY field. See “Formatting options”.
e.g.
ADDR(CNT=FC)
These options can be specified in the [ADDRESSFORMAT] section of Address Formatting Configuration File as follows:
Option | waf.ini [ADDRESSFORMAT] |
---|---|
COUNTY=FULLCOUNTYNAME |
COUNTYNAME=1 |
COUNTY=ADMINCOUNTYNAME |
COUNTYNAME=2 |
COUNTY=TRADCOUNTYNAME |
COUNTYNAME=3 |
Combining address formatting options
Where more than one option for an address element is required they can be combined as follows:
e.g.
ADDR(LC=6,LL=40,TWN=EL:1;CA:1,CNT=EL:1)
This sequence instructs the server to return the ADDR field with 6 lines of formatted address with a maximum line length of 40. The town name is never eliminated and is formatted in upper case. The county name is also never eliminated.
ADDR(LC=4,LL=30)
This sequence instructs the server to return the ADDR field with 4 lines of formatted address with a maximum line length of 30.
DELIMITER values
Value | Meaning |
---|---|
M |
Comma |
I |
Semicolon |
N |
Colon |
E |
Equals |
S |
Space |
T |
Tab |
C |
Carriage Return |
L |
Line Feed |