skip to Main Content

xplan xmerge

Generic filters
Exact matches only
Filter by Custom Post Type

Try these: client detailstasks syntaxsuperannuation


From property through to your car and cash assets, all your positive non-retirement asset positions should be stored in this powerful standard element.  The xmerge codes here will assist you to output details from this space:

Setec Astronomy

<:for item in $client.asset:>
Sub-type: <:=item.type:>
Description: <:=item.desc:>
Current Value: <:=item.amount:>


All the fields below can be used in the loop above:




Type type_group <:=item.type_group:>
Sub Type type <:=item.type:>
Platform selected_platform <:=item.selected_platform:>
Description desc <:=item.desc:>
Policy Number policy_number <:=item.policy_number:>
Status status <:=item.status:>
Current Value ($) amount <:=item.amount:>
Client Amount ($) amount_client <:=item.amount_client:>
Partner Amount ($) amount_partner <:=item.amount_partner:>
Recommended Value ($) recommended_value <:=item.recommended_value:>
Calculated from investments amount_derived <:=item.amount_derived:>
Net Position ($) net_position <:=item.net_position:>
Owner^ owner <:=item.owner:>
Owner String owner_string <:=item.owner_string:>
See below for more - -
Linked Data    
Linked Portfolio Accounts^ linked_portfolio_accounts <:=item.linked_portfolio_accounts:>
Linked Bank Account values_last_updated <:=item.linked_bank_account:>
Linked Objectives linked_objective_desc <:=item.linked_objective_desc:>
Linked Liability^ linked_liability <:=item.linked_liability:>
Linked Liabilities^ linked_liabilities <:=item.linked_liabilities:>
Supplier supplier <:=item.supplier:>
Product Code date_submitted <:=item.date_submitted:>
Account Number date_commenced <:=item.date_commenced:>
Thread threadid <:=item.threadid:>
Created By created_by <:=item.created_by:>
Created Date created_at <:=item.created_at:>
Last Updated By last_updated_by <:=item.last_updated_by:>
Initial Value initial_value <:=item.initial_value:>
Withdrawal capital_withdrawal_amount <:=item.capital_withdrawal_amount:>
Establishment Date establishment <:=item.establishment:>
Acquisition Date acq <:=item.acq:>
Units units <:=item.units:>
Costs cost <:=item.cost:>
Valuation Type valuation_type <:=item.valuation_type:>
Valuation Date valuation_date <:=item.valuation_date:>
Valuers Details asset_valuer <:=item.asset_valuer:>
Maturity Value maturity_value <:=item.maturity_value:>
Maturity Date maturity_date <:=item.maturity_date:>
Disposal Date disposal_date <:=item.disposal_date:>
Market Value market_value <:=item.market_value:>
Values Last Updated values_last_updated <:=item.values_last_updated:>
Income Amount income_amount <:=item.income_amount:>
Income Percent income_percent <:=item.income_percent:>
Income Frequency income_frequency <:=item.income_frequency:>
Start Date income_start_date <:=item.income_start_date:>
End Date income_end_date <:=item.income_end_date:>
Reinvest Income reinvest_income <:=item.reinvest_income:>
Contribution Amount contribution_amount <:=item.contribution_amount:>
Frequency contribution_frequency <:=item.contribution_frequency:>
Contribution Method contribution_method <:=item.contribution_method:>
Annual Escalation contribution_escalation <:=item.contribution_escalation:>
Annual Escalation Type - <:=item.value_contribution_escalation_type:>
Comments comment <:=item.comment:>
Adviser Comments adviser_comments <:=item.adviser_comments:>

^ More information on these items is available below or in the see also section

Owner Breakdown

Further breakdown the owner information and splits:

Setec Astronomy

<:for item in $client.asset:>
<:for owner in item.owner_list:>
Name: <>
Entity ID: <:=owner.entity_id:>
Amount: <:=owner.amount:>
Percent: <:=owner.percent:>

Further owner details

Assets can be linked to other clients and related entities (not just client and partner) and by using the $entity() function and the owner entity id we can access all the details of that owner:

Setec Astronomy

<:for item in $client.asset:>
<:for owner in item.owner_list:>
First Name: <:=$entity(int(owner.entity_id)).first_name:>
Last Name: <:=$entity(int(owner.entity_id)).first_name:>
Preferred Phone: <:=$entity(int(owner.entity_id)).preferred_phone:>

Checking for assets

Using the len() function is the simplest way to see if any assets exist:

Setec Astronomy

<:if len($client.asset):>
<:for item in $client.asset:>
Description: <:=item.desc:>
Current Value: <:=item.amount:>
You have no recorded assets 🙁

Multi conditional filtering

An alternative way, which is good for when you want to check multiple conditions or logic:

Setec Astronomy

<:if len([x for x in $client.asset if str(x.status) in [‘Existing’] and floatify(x.amount.value)>0]):>
<:for item in [x for x in $client.asset if str(x.status) in [‘Existing’] and floatify(x.amount.value)>0]):>
Description: <:=item.desc:>
Current Value: <:=item.amount:>
You have no existing assets with a balance recorded

Filtering Assets

Filter to Type & Status

You can easily add or remove multiple .filters() to the code as needed.  In the below example it will look for lifestyle assets with a status of existing and that belong to the client

Setec Astronomy

<:if len($client.asset.filter(‘type_group=5’).filter(‘status=Existing’).filter(‘owner=Client’)):>
<:for item in $client.asset.filter(‘type_group=5’).filter(‘status=Existing’).filter(‘owner=Client’):>
Description: <:=item.desc:>
Current Value: <:=item.amount:>

Multi conditional filtering

This style syntax is useful for when working with multiple conditions and logic patterns:

Setec Astronomy

<:for item in [x for x in $client.asset if str(x.type_group) == “Life Style” and str(x.status) == “Existing” and float(x.amount.value)>0]:>
Description: <:=item.desc:>
Current Value: <:=item.amount:>

Sorting Assets

Setec Astronomy

<:for item in $client.asset.sort(‘amount’):>
Description: <:=item.desc:>
Current Value: <:=item.amount:>

Reverse Sort

Setec Astronomy

<:for item in $client.asset.sort(‘-amount’):>
Description: <:=item.desc:>
Current Value: <:=item.amount:>


Simple Sum method

Setec Astronomy

Simple: <:=$client.asset.sum(‘amount’):>
Raw: <:=$client.asset.filter(‘status=Existing’).sum(‘amount’)>

Entity Sum Function

Setec Astronomy

Raw: <:=sum([floatify(asset.amount) for asset in $client.asset]):>
$<:=currency(sum([floatify(asset.amount.value) for asset in $client.asset]),0):>

Entity Sum Function with conditions

Setec Astronomy

Raw: <:=sum([floatify(asset.amount) for asset in $client.asset if str(asset.owner) in [‘Client, Joint’]]):>
$<:=currency(sum([floatify(asset.amount.value) for asset in $client.asset if str(asset.owner) in [‘Client, Joint’]]),0):>

See also

Back To Top