skip to Main Content

xplan xmerge

Generic filters
Exact matches only
Filter by Custom Post Type

Try these: client detailstasks syntaxsuperannuation

Dependant Group Details

You can add details about a clients dependants (such as children) through the Dependants Xplan Element (XE).  The details can then be accessed through the following loop:

Setec Astronomy

<:if len($client.dependent):>
<:for item in $client.dependent:>
Name: <:=item.dep_name:> <:=item.dep_last_name:>
Relation: <:=item.relation:>
(or any other field from the list below)

Dependant Group Fields

The following fields can be used in the loop above:




Entity dependent_entityid <:=item.dependent_entityid:>
Title dep_title <:=item.dep_title:>
First Name dep_name <:=item.dep_name:>
Last Name dep_last_name <:=item.dep_last_name:>
Relation relation <:=item.relation:>
Related To dep_related_to <:=item.dep_related_to:>
Other Fields    
Preferred Name dep_preferred_name <:=item.dep_preferred_name:>
Date of Birth dep_dob <:=item.dep_dob.format('%d %B %Y'):>
Age dep_age <:=item.dep_age:>
Gender dep_sex <:=item.dep_sex:>
Financial Dependant financ_dep <:=item.financ_dep:>
Dependant Until dep_until_age <:=item.dep_until_age:>
Comments dep_comment <:=item.dep_comment:>

Dependant Group Filtering and Sorting

The syntax below illustrates a common scenario seen in merge documents whereby the group is limited to financial dependants and sorted by age (youngest to oldest):

Setec Astronomy

<:if len($client.dependent.filter(‘financ_dep=1’)):>
<:for item in $client.dependent.filter(‘financ_dep=1’).sort(‘age’):>
Financial Dependant: <:=item.dep_name:> (<:=item.dep_age:>)

Reverse Sort Order

Rememebr you can reverse the sorting (oldest to youngest) by adding ‘-‘ in front of age like (‘-age’)

Using the Entity ID

There are numerous groups and data points in Xplan where you will be presented with the ability to select a client.  This is effectively linking an actual client in Xplan to a particular record, in the case of dependants this can come up because the children might also be clients of the advisers.

You can use this link to extract any further detail about the entity using the syntax described here.

Setec Astronomy

<:for item in $client.dependent:>
Name: <:=$entity(int(item.dependent_entityid)).first_name:>

Joining dependants in a sentence

In various outputs, some clients may wish to show all of a clients dependants names in a sentence style structure, for example: “Your dependants are: John, Jane and Dave-o”.  When doing this it means you need a mechanism to determine the number of dependants and their position so that you can include the sentence case such as commas and an ‘and’ before the final name.

To achieve this, you can use the following xplan code:

Setec Astronomy

<:let depList = [str(x.dep_name) for x in $client.dependent]:>
<:=len(depList)> 1 and (‘ and ’.join([‘, ’.join(depList[:-1])] + depList[-1:])) or ‘’.join(depList[0]):>

See also

Back To Top