skip to Main Content

xplan xmerge

Search
Generic filters
Exact matches only
Filter by Custom Post Type

Try these: client detailstasks syntaxsuperannuation

Address Details

This is the core Xplan group where all the clients address information is stored.

Most commonly these details are accessed through the following general loop:

Setec Astronomy

<:if len($client.address):>
<:for item in $client.address:>
<:=item.street:>
<:=item.suburb:> <:=item.state:> <:=item.postcode:>
<:end:>
<:end:>

Address Group Fields

All the fields that you can use in the loop above:

Field

Path

Syntax

Type type <:=item.type:>
Preferred preferred <:=item.preferred:>
Street street <:=item.street:>
Suburb suburb <:=item.suburb:>
State state <:=item.state:>
Post Code postcode <:=item.postcode:>
Country country <:=item.country:>
Other Fields    
Status status <:=item.status:>
Source source_origin <:=item.source_origin:>
Time At Address time_at_current_address <:=item.time_at_current_address:>
External Identifier xpt_external_id <:=item.xpt_external_id:>
Current Residential Address xpt_current_residential_address <:=item.xpt_current_residential_address:>

Filtering Addresses

Clients can have multiple addresses recorded (Residential/Business/Postal etc).  The syntax below is an example of filtering to only output the residential address:

Setec Astronomy

<:if len($client.address.filter(‘type=1’)):>
<:for item in $client.address.filter(‘type=1’):>
<:=item.street:>
<:=item.suburb:> <:=item.state:> <:=item.postcode:>
<:end:>
<:end:>

Standard Type values

In the above example we are filtering by type of address where “1“, corresponds to the field definition value associated with the Residential type.  The standard Xplan values are outlined below:

Value  |  Text

0  |  Postal
1  |  Residential
2  |  Business
registered  |  Registered Address

Uppercase Suburb / State

These fields in Xplan do not enforce or convert the suburb and state fields to be uppercase – its entirely dependant on how the user inputs the data.

To ensure consistency in your outputs, you need to modify the syntax to ensure they are strings so you can use then use the  .uppercase() method to force the output:

Setec Astronomy

<:if len($client.address):>
<:for item in $client.address:>
<:=item.street:>
<:=item.suburb.text.upper():> <:=item.state.text.upper():> <:=item.postcode:>
<:end:>
<:end:>

Adding the .text attribute calls ensures its a string which then allow you to add any other string methods such as .upper().  You could also achieve this by converting it to a string like <:=str(item.suburb).upper():>.  Sometimes you may also see .value used, which in this case has the same effect.

Output address on one line

When trying to output an address all on one line, you may notice that you don’t get the full address (a lot of it seemingly vanishing).  This is caused by the “street” field being a multi-line string and in its native form doesn’t play nice when other fields are put on the same line as it.

One of the easiest ways to resolve this is by forcing the output as plain text by adding the .value or .text attribute:

Setec Astronomy

<:if len($client.address):>
<:for item in $client.address:>
<:=item.street.text:> <:=item.suburb.text:> <:=item.state.text:> <:=item.postcode.text:>
<:end:>
<:end:>

See also

Back To Top