Welcome and Introduction
Sessions |
Welcome and Introduction |
Using the XWORD Toolbar and Help Code Library |
XPLAN Fields and Groups |
Coding a basic letter |
XPLAN Tables (Group Fields):
|
Lunch |
Using Conditions to Include or Exclude Content |
Coding from Documentary Library |
Inserting Details from IPS |
Coding for XTOOLS and XTOOLS+ Projections |
Coding from Risk Researcher Scenarios |
Consolidation of Learning & Questions |
End |
Using this Guide
This guide has been written and structured to be as easy to follow as possible. To help you to navigate through this guide, a number of symbols are used to help identify key points or sections.
Important - your really need to read these sections | |
Extra information you only need to read these sections when you are confident with the system basics or if you want more background information and detail |
|
This symbol highlights useful hints or tips on the system | |
Activities to be completed with the trainer |
Session Focus
Prerequisites
New User - Admin
New User - Adviser
New User - Risk Advice
Understand the basic workings of the different XPLAN modules (especially IPS, XTools and XTools+). And have good knowledge of Microsoft Word and Financial Planning concepts.
Expectation
What you can expect from today’s session?
Demonstration
Case Study
Hands on activities
Session outcomes
After completing this workshop, you will be able to:
Use the XWord toolbar
Understand the basis for XPLAN coding
Code a basic letter
Include information using 'if' and 'else' statements
Incorporate tables into their documents
Include IPS charts and reports
Include XTools/+ outputs.
This workshop aims to provide you with the knowledge of XPLAN code. It is NOT to build an advice document.
1.1 Introduction
Overview
Many advisers use the Advice to Client process to manage the advice process in their business. To enable participants to be able to relate to the different modules in XPLAN, this course is structured along the line of the Advice to Client process.
XPLAN and Financial Planning
The components and tools in XPLAN have been created to support and complement the process of providing quality and efficient recommendations to clients.
2.1 XPLAN Overview
XPLAN is a web based financial planning software package that brings together the different stages in the advice process through the use of a number of modules and tools.
XPLAN enables delivery of advice to clients through integrated client management, modelling and portfolio management tools and applications.
The facilitator will demonstrate and take you through each of the modules and tools, and explain their function to you.
2.2 XPLAN Components
Client Focus |
A comprehensive Fact Find and Client Relationship Module. This is where client data is entered. Underlying these functions is the task management capability, which is designed to support the workflow process within a business. |
XPLAN CRM Office |
A suite of tools which not only provides users with standard document templates but also the functionality to build customised templates. These tools provide the ability to manage the templates as well as to merge data from the system into the templates. |
XTools | A suite of tools which can be used for projection and analysis. Some of the calculators can be used in a client facing situation. |
XTOOLS+ |
XTOOLS+ is a powerful modelling tool that can be used to model and compare cashflows and projections. |
IRESS Portfolio System (IPS) |
IPS is used to manage and provide reporting on client portfolios |
Risk Researcher |
A fully interactive risk research tool that provides both qualitative and quantitative analysis for personal risk insurance products. |
SuperSolver | A superannuation comparison tool that provides product specific comparisons of costs and intangible plan features. It provides data on hundreds of retail, industry, government and corporate superannuation funds, and allows for the creation of new plans or deriving new plans from existing plans. |
Debt Qualifier |
It is a mortgage-qualification and analytics system. It provides a single point solution for Debt and Risk Management for existing and new clients. |
2.3 Logging into XPLAN
To login, access your designated website by typing in your website address
The login page for your website is displayed
Enter your User ID and Password and click .
2.4 Navigating the XPLAN Interface
The XPLAN interface is composed of three areas, the Title bar, the Navigation menu, and the Main Page.
Title Bar
Available in all areas of XPLAN
Quick links to XPLAN, Add (Client, Note, Task), Help, Logout and List of Clients. From v2.1 the ‘Home’ button has a default ‘XPLAN’ but can be customised.
Quick search for Clients, Users, Groups, Documents, Tasks (by ID), Suppliers, Professional Advisors and Referrers
Recent is the list of clients recently worked on.
Advanced function allows users to search the client base that meet certain criteria.
The Instant Search icon allows you to search for any key heading within your XPLAN system. Once you have searched, hyper links will be shown to take you directly to that location.
Navigation Menu
Located on the left of many XPLAN screens
Allows for access to XPLAN modules and subsections
Client Focus Screen
The Client Focus screen is displayed when a specific client has been selected and comprises the following sections:
Title bar provides shortcuts to various commonly used functions within XPLAN.
Home or XPLAN menu - access to the various XPLAN components are located
Any time you see click on the arrow to access additional options and sub menus.
2.5 Getting Help
Overview
XPLAN has an Online Help function which provides the most up to date information on the different components and tools in the system. Interactive Tutorials are also available for viewing Training Workshops. The Help files also provide updates on all new software versions.
Accessing Help
Click on the Help function located on top of the Title bar
The ‘Help’ screen is displayed
Navigate using the menu bar located on the left.
You may also want to use the “Search” function available.
Accessing Interactive Tutorials from within the Help Files
Select Video Tutorials followed from the menu bar located on the left:
Click on the workshop you would like to view.
A video will start automatically with a chapter menu available from the left side menu bar.
Click on the workshop you would like to view.
Follow the online prompts to view individual videos.
Dashboard is the default ‘home’ screen.to load. To navigate back to the ‘home’ screen, just click on the site logo. You can also open additional windows by holding down the ‘Shift’ key and click on the logo. ‘Ctrl’ and click will open new tabs. News is also available through a dashboard tab. |
3.1 Creating a Template Category
Access Template Management by clicking XPLAN button, select Administration Functions > Templates
Click Add Category button. The Report Category Details editor displays.
Enter a Category Name and (optionally) a Description for the new category.
Click Create. The category is created and its details display.
Click Edit.
The following settings can be modified:
Category Owner - sets the owner of the category
Only Editable By Category Owner - if set to Yes, only the category owner can edit the category
Visible to All - controls if the category is visible to all users. To restrict visibility to certain groups, set to No.
Click Save.
On the navigation menu, select Groups.
Use the Search box to search and select groups that you wish to grant visibility to this category.
Deleting: Click on the category name with the dropdown arrow next to it at the top of screen |
3.2 Adding a template to a Template Category
Access Template Management by clicking XPLAN button, select Administration Functions > Templates
Click the icon next to your chosen Category to expand this category.
A list of existing templates in the category is displayed.
Click Add Template button. The Report Template Details editor displays.
Enter the Template Name and Description.
Select the Report Type for the template.
Click Create. The Report Category Details window displays.
On the navigation menu, select Files.
Click Browse, find and select the template to upload.
Enter a Description of the template file.
Click Upload.
The Merge Report facility allows you to create templates with XPLAN coding. Once created, templates can be sent to an individual client or you can send to many clients at a time.
4.1 Mail merge
Select List > Entire List from the menu in the top right hand corner.
Reduce the list using the search Criteria function if necessary.
If you want to send only to a selection of clients in the list then use the checkboxes at the left hand side of the client names to denote those that will receive the letter; otherwise, just leave the clients unchecked.
In the left hand side menu select Reports > Merge Reports.
Select to send to All Listed Clients or Only Selected Clients as required.
Select the appropriate Report Category
Click the icon of the letter you want to send to clients.
If you want the merged document to be linked to the client record as an attachment to a client note, select the Add merge result as document note checkbox at the bottom of the page.
XPLAN can export Xmerge outputs electronically to 3rd party services, who can print and mail the documents directly to clients. Selecting Send report by post allows documents to use this facility.
Click the Execute button in the top right hand corner
5.1 Installing the XWord Toolbar
Close Word and Outlook if they are currently running (Outlook uses word to edit and compose emails).
Download the XWord software from XPLAN found via the homepage within Administration Functions > Templates > Reporting Tools > XWord
Extract the XWord Zip File into a temporary directory.
Double Click on PocketXMLRPC_w32_101.exe to install the XMLRPC Library (You will need administrator privileges otherwise it will silently fail - i.e. without reporting an error).
Follow the onscreen wizard to complete the XMLRPC Library Installation.
Double check that Pocket XML RPC has been installed in the Add/Remove programs section of the control panel.
Now copy the file XWord.dot into the Start Up folder for Microsoft Word. On Windows XP this will be the following directory: C:\\Documents And Settings \ <insert your username here> \ Application Data \ Microsoft \ Word \ STARTUP (e.g. C:\\Documents And Settings \ Joe Bloggs \ Application Data \ Microsoft \ Word \ STARTUP).
Open Word.
Once you open word, you will notice the button in the Add-Ins tab.
To connect the toolbar to your XPLAN site; click on XPLAN and Connect to XPLAN (if you are using the XWord file then select Run from an XWord File button and select the XWord file you downloaded from XPLAN).
Once the prompt appears:
XPLAN URL: <Your Site Name> (excluding /frame/home).
Username: Your XPLAN site Login ID.
Password: Your XPLAN site Password.
Click on and Word will connect to XPLAN (NOTE: this may take about 25-30 seconds to establish the connection).
Once the toolbar is connected, it will expand as below:
5.2 The Toolbar
Once connected, the XWord toolbar will display a series of menus.
Entity Category Element
Entity: The Entity from which you would like to attain the information from. This includes client, partner & adviser. Also in this area you will find IPS & XTools.
Category: This is the group from where the field that you are looking for belongs.
Element: The particular field that you want to bring into the document.
Note: Group Fields are collated under the Category ‘List’.
Insert Element : This will insert the selected Element option into the document.
Insert Control Element : This allows manipulation of Field groups.
Filters : Allows users to add a filter depending on whether there is a partner on the client’s record.
Address Shortcut : Allows user s to enter address details.
Client information in XPLAN can be stored in two ways; in an ‘Entity Field’ or in a ‘Field Group’.
6.1 Entity Fields (Single Fields)
‘Entity Fields’ store pieces of information that the client only has one of. For example, a client may have only one date of birth, one first name, surname, etc. In XPLAN you can edit entity fields by clicking the ‘Edit’ button at the top, right corner of the screen.
The fields shown below are all examples of ‘Entity Fields’:
6.2 Group Fields
‘Groups Fields’ are groups of ‘Entity Fields’ which are grouped together to store multiple pieces of similar information. For example, a client may have many telephone numbers, or perhaps a separate residential, postal and business address, all of which needs to be stored in XPLAN. XPLAN handles such client data items by grouping relevant fields and displaying them as shown in below.
To add an item to a group you will need to click the ‘Add’ button shown at the top right corner of where the ‘Field Group’ is shown on the page.
When adding an item to a group you will be able to enter information into all of the fields within that ‘Field Group’.
The ‘Address’ group is an example of a ‘Field Group’:
6.3 Inserting Entity Fields and Groups from the XWord Toolbar
Information stored in a ‘Field Group’ can be inserted using the XWord toolbar in a slightly different manner than an ‘Entity Field’ would be. All ‘Field Groups’ can be found under ‘List’ in the middle dropdown menu on the ‘XWord’ toolbar. See Fig 4 below.
With ‘List’ selected in the middle dropdown box you have access to all the ‘Field Groups’ in your XPLAN site:
Work from left to right across the dropdown menus to find the field you want and click the lightning bolt to insert the code.
If you are inserting an item that the client can have more than one of, such as phone numbers, addresses, dependents etc, you can find this under ‘List’ in the middle dropdown menu. Think about this if you can’t find the field you’re looking for.
Click the ‘Insert Control Element’ icon to insert conditional code or field group control elements.
7.1 Basic Letter
The block of code below can be used as the basis for most standard letters. The letter sign off will be that of the client’s adviser as entered into XPLAN.
<:=datetime_merge.format('%d %B %Y'):>
<:=$client.address_title:>
<:for item in $client.address.filter(‘preferred=True’):>
<:=item.street:>
<:=item.suburb:> <:=item.state:> <:=item.postcode:>
<:end:>
Dear <:=$client.salutation:>,
Insert letter text here...
Regards,
<:=$client.client_adviser.first_name:> <:=$client.client_adviser.last_name:>
<:if $client.client_adviser.user_qualifications:>
<:=$client.client_adviser.user_qualifications:>
<:end:>
<:=$client.client_adviser.jobtitle:>
<:if $client.client_adviser.authorised_rep_no:>
<:=$client.client_adviser.authorised_rep_no:>
<:end:>
Activity 1
To create your SOA cover letter include the details below
Date
Clients Address Title and Address
Salutation or First Name
Main body of the letter stating
Details of the Adviser e.g, Name and Address and contact details.
Word sometimes holds formatting that you can’t see (in the background) which will not allow the code to work. Our suggestion is to copy the code into Notepad and then copy and paste it back into the template, this should remove the hidden formatting and the code should work. If the problem persists, please email the section of the template with issues through to XPLANsupport@iress.com.au and cc your account manager in.
The time that you will spend re-formatting your new document will be far less than the time that you will spend fixing any formatting issues that may flow from your old document.
To force a string field to merge into upper case add.value.upper() into the code. For example: To ensure that the advisers name on a letter is in capitals:
<:=$client.client_adviser.first_name.value.upper():>
<:=$client.client_adviser.last_name.value.upper():>
Another example is to force the suburb and state to merge into upper case:
<:for item in ([x for x in $client.address if x.valueOf(‘preferred’)]):>
<:=item.street:>
<:=item.suburb.value.upper():> <:=item.state.value.upper():> <:=item.postcode:>
<:end:>
The date code provided in the document cannot be attained from the XPLAN tool bar. You will need to copy and paste this code into your document. (See Appendices: Date Time Codes for further information.)
Never use text boxes in Footnotes. If you do you will see that your template can merge although you will not be able to print it.
<:=datetime_merge.format('%d %B %Y'):>
<:=$client.address_title:>
<:for item in $client.address.filter('preferred=True'):>
<:=item.street:>
<:=item.suburb:> <:=item.state:> <:=item.postcode:>
<:end:>
Dear <:=$client.salutation:>,
Thank you for the opportunity to assist you with advice on your financial affairs. I am pleased to present this Statement of Advice (financial plan), which sets out my specific recommendations for your consideration. These recommendations are based on information obtained from the fact find prepared at our initial meeting and outline how your goals and objectives can be achieved.
Details of your personal and financial circumstances are included in the body of this report and form the basis of our recommendations. If you find that any of the background information contained in this report is incorrect, or if you have anything further to add then please advise me before proceeding any further. The recommendations made in this financial plan are based on your current financial position, objectives and personal information, which may change. If your circumstances change and/or thirty (30) days have elapsed since the date of this statement of advice, you should not act on any recommendations without first discussing these with me.
Should you have any queries in relation to the above or should you wish to fine-tune any aspect of the recommended strategy, please do not hesitate to contact me on:
<:=$client.client_adviser.preferred_phone:> or <:=$client.client_adviser.preferred_email:>.
Yours sincerely,
<:=$client.client_adviser.first_name:> <:=$client.client_adviser.last_name:>
Authorised Representative of <:=$client.client_adviser.employer:>
8.1 Standard Insertion of a Group Field table
When using Xmerge codes to display the contents of a ‘Group’ in XPLAN it is possible to produce a table purely using code.
Example:
Information from the dependant group field in XPLAN can be presented in a table including names, ages, relationship and whether the entries are financially dependent or not, using the following code:
<:=$client.table('dependent',column='dep_name,dep_age,financ_dep,dep_rel', sort='1,2,3,4', width='2,1,1,1', format='Unknown'):>
The code can be entered by selecting the following fields from the toolbar:
Once you have entered the code click ;
This will bring up the following:
Select the fields that you want added in the table;
Select the sort order, and the relative column width;
Select the table format; and click .
This will produce an output similar to the table below:
Name |
Age |
Relation |
Dependant |
Jay Smith |
17 |
Child |
Yes |
Jenny Smith |
14 |
Child |
No |
John Smith |
57 |
Other |
Yes |
Once the table is produced, you will notice that the table format is limited to the format that exists in XPLAN. Prior to merging the document there is no control over the formatting of the table.
8.2 Controlling Table Formats
Much greater control over the appearance of the output table can be achieved by inserting control elements into an MS Word table. The arrangement below will produce a table containing the same information as the one above, however the format and look of the table can be arranged prior to merging the document.
Click on , this will pull through the following table:
Once you click on , the following code will come through:
<:for item in $client.dependent:>The code can be arranged, into a table by using the table function in Word. This can be done as follows:
Name |
Age |
Relation |
Dependent |
<:for item in $client.dependent:> |
|||
<:=item.dep_name:> |
<:=item.dep_age:> |
<:=item.dep_rel:> |
<:=item.financ_dep:> |
<:end:>
This will produce the following:
Name |
Age |
Relation |
Dependant |
Jay Smith |
17 |
Child |
Yes |
Jenny Smith |
14 |
Child |
No |
John Smith |
57 |
Other |
Yes |
By using the ‘Insert Control Element’ function from the XWord toolbar in conjunction with the table function in MS Word, formatting the table and the text is made possible.
The table format forstandard tables, can be found in XPLAN:
Administration Functions > Templates > Merge Template > Table Format
Changing the table format (if the XPLAN capability is enabled) will require reconnecting the Centrepiece.
When using the ‘Control Element’ function and rearranging the table, ensure <:end:> is included in a separate line.
8.3 Filtering
It is often useful to apply a filter so that only the desired items are merged into the document.
The code can be attained from the toolbar or it can be entered manually by entering the.filter('Field_Name=Filter Criteria')addition to the code.
Example:
To display only dependants who are children (using the toolbar):
Click on , this will pull through the following table:
Once you click on , the following code will come through:
<:for item in $client.dependent.filter('dep_rel=Child'):>
<:=item.dep_name:> <:=item.dep_age:> <:=item.dep_rel:> <:=item.financ_dep:>
<:end:>
The code can be arranged, into a table by using the table function in Word. This can be done as follows:
Name |
Age |
Relation |
Dependent |
<:for item in $client.dependent:> |
|||
<:=item.dep_name:> |
<:=item.dep_age:> |
<:=item.dep_rel:> |
<:=item.financ_dep:> |
<:end:>
This will produce the following:
Name |
Age |
Relation |
Dependant |
Jay Smith |
17 |
Child |
Yes |
Jenny Smith |
14 |
Child |
No |
The filter function can be applied using fields which are not presented on the table, but are part of the field group.
8.4 Sorting
Sorting can be applied to the table by using the toolbar or it can be entered manually by entering the.sort('Field_Name') addition to the code.
Example:
To display information sorted by dependant age (using the toolbar):
Click on , this will pull through the following table.
Once you click on , the following code will come through:
<:for item in $client.dependent.sort('dep_age'):The code can be arranged, into a table by using the table function in Word. This can be done as follows:
Name |
Age |
Relation |
Dependent |
<:for item in $client.dependent:> |
|||
<:=item.dep_name:> |
<:=item.dep_age:> |
<:=item.dep_rel:> |
<:=item.financ_dep:> |
<:end:>
This will produce the following:
Name |
Age |
Relation |
Dependant |
Jay Smith |
17 |
Child |
Yes |
Jenny Smith |
14 |
Child |
No |
John Smith |
57 |
Other |
Yes |
Multiple sorting criteria can be applied, by using the .sort('Field_Name') function.
Reverse sorting order can be applied as follows: .sort('-Field_Name')
Activity 2a
Create Personal Details table for client and partner (Using Ms Word Table) Include the following details in the table
1. Title | 6. Age |
2. First Name | 7. Marital Status |
3. Last Name | 8. Health |
4. Gender | 9. Address |
5. Date of Birth | 10. Contact Number |
Example Personal Details Table
Personal | Client | Partner |
Details | ||
Title | <:=$client.title:> | <:=$partner.title:> |
First Name | <:=$client.first_name:> | <:=$partner.first_name:> |
Surname | <:=$client.last_name:> | <:=$partner.last_name:> |
Gender | <:=$client.sex:> | <:=$partner.sex:> |
Date Of Birth | <:=$client.dob:> | <:=$partner.dob:> |
Age | <:=$client.age:> | <:=$partner.age:> |
Marital Status | <:=$client.marital_status:> | :=$partner.marital_status:> |
Health | <:=$client.health:> | :=$partner.health:> |
Address |
<:for item in $client.address.filter('preferred=True'):> <:=item.street:> <:=item.suburb:> <:=item.state:> <:=item.postcode:> |
|
Contact Number | <:=$client.preferred_phone:> | <:=$partner.preferred_phone:> |
Activity 2b
Work with your facilitator to create a dependants table using XWord - Sort by Age. Insert the table format created by you at the beginning.
Example code for Dependant (this does not include sorting):
<:=$client.table('dependent', column='dep_name,dep_sex,dep_dob,dep_age', sort='1,2,3,4', width='1,1,1,1', format='Jess Table 28032012'):>
One of the reasons why Xmerge is so powerful is its ability to set conditions on the inclusion of content.
9.1 Inserting Content on Partner condition
The simplest and most commonly used example of conditional code in Xmerge is the <:if $partner:> condition. This condition enables us to display one thing if the client has a partner and something entirely different if there is no partner.
The <:if $partner:> conditional code can be inserted by clicking on the ‘if client has a partner’ icon.
Example 1
In this example the a table with a column for both ‘Client and Partner’ are displayed if there is a partner but if the client has no partner the table displayed has only a ‘Client’ column.
<:if $partner:>
Detail |
Client |
Partner |
First Name |
<:=$client.first_name:> |
<:=$partner.first_name:> |
Surname |
<:=$client.last_name:> |
<:=$partner.last_name:> |
Date of Birth |
<:=$client.dob:> |
<:=$partner.dob:> |
<:else:>
Detail |
Client |
First Name |
<:=$client.first_name:> |
Surname |
<:=$client.last_name:> |
Date of Birth |
<:=$client.dob:> |
<:end:>
9.2 Inserting Content based on Completion of a Field
Sometimes we may want to display content only if a certain field has been completed.
Example 2
The following sentence should only be included if the client’s date of birth has been entered.
<:=$client.preferred_name:>, your date of birth is <:=$client.dob:>.
It is very simple to insert the condition here. All we need to do is take the ‘Date of Birth’ code and remove the ‘=’ sign and insert an ‘if’. ie. <:if $client.dob:>. You will also need and <:end:> tag.
So our code the code would be...
<:if $client.dob:>
<:=$client.preferred_name:>, your date of birth
is <:=$client.dob:>.
<:end:>
9.3 Inserting Content based on whether items have been entered into a Group
A condition can be inserted to only display content if items have been entered into a group.
Example 3
We only want to display the following sentence if dependents have been added to the dependents group.
You have <:=len($client.dependent):> dependents.
Where <:=len($client.dependent):> is the number of items that have been entered into the dependent group.
All we need to do is test that items exist in the ‘dependent’ group, that is we need to test if there is a <:=len($client.dependent):>. We can do this by simply removing the ‘=’ sign and inserting an ‘if’. ie. <:if len($client.dependent):>. You will also need and <:end:> tag.
So the code would be:
<:if len($client.dependent):>
You have <:=len($client.dependent):> dependents.
<:end:>
Example 4
Of course an ‘else’ case can also be used:
<:if len($client.dependent):>
You have <:=len($client.dependent):> dependents.
<:else:>
You have no dependents.
<:end:>
Example 5
Filters can also be used for example if we wanted to display only the number of financially dependent children and only if there is one or more we could use:
<:if len($client.dependent.filter(‘dep_rel=Child,financ_dep=1’)):>
You have <:=len($client.dependent.filter(‘dep_rel=Child,financ_dep=1’)):> financially dependent children.
<:else:>
You have no financially dependent children.
<:end:>
Activity 3a
Work with your facilitator to include the dependants’ details only if these details have been entered in to Client Focus. If the details are not mentioned then use the ‘<:else:>’ command to state ‘You have not disclosed this information to us’.
Example:
<:if len($client.dependent):>
<:=$client.table('dependent', column='dep_name,dep_dob,dep_age,dep_until_age,financ_dep',sort='3,2,4,5,1', width='1,1,1,1,1', format='AWs Table'):>
<:else:>
You have not disclosed this information to us.
<:end:>
Activity 3b
Work with your facilitator to include any Assets and Liabilities of the clients only if these details have been entered into XPLAN. If the details are not mentioned then use the ‘<:else:>’ command to state ‘You have not disclosed this information to us’.
Example: Assets & Liabilities Table
Assets
<:if len($client.asset):>
<:=$client.table('asset', column='type,amount,owner', sort='1,3,2', width='1,1,1'):>
<:else:>
You have no disclosed this information to us.
<:end:>
Liabilities
<:if len($client.liability):>
<:=$client.table('liability', column='type,amount,owner', sort='1,3,2', width='1,1,1'):>
<:else:>
You have no disclosed this information to us.
<:end:>
Total Net Worth |
$<:=$client.total_net_assets:> |
This allows you to use codes to reference data stored in the ‘Document Library’, therefore you can update information in the site and this can reference to a number of templates, rather than having to go into each template and modify the information individually.
10.1 Coding from the Note
Firstly you need to add the note into the Document Library (as shown in the screen shot below)
Then simply use the code below:
<:=$docnote('Root Directory/Sub Directory/Note Subject'):>
Example:
As per the insert above, the appropriate code would be as follows:
<:=$docnote('XMERGE Library/Compliance Requirements/Disclosure'):>
10.2 Coding from the Note Attachments
You need to add the note and attachment into the Document Library (as shown in the screen shots below).
Then simply use the code below:
<:=$docnote('Root Directory/Sub Directory/NoteSubject, part=’Document Name’):>
Example
As per the insert above, the appropriate code would be as follows:
<:=$docnote('XMERGE Library/Market Outlook/June Quarter’, part=’Market Outlook.doc’):>
You will notice that the path within the brackets follows the path of the category and the document name.
XWord includes functions which will extract details of the current portfolios for the clients. These functions can be accessed by changing the entities to and then selecting the appropriate Category and Element to get the desired output.
Example
To get the current investment assets that the client holds, the following steps need to be taken.
Change the filters to and click on . Note in the Category select Valuation and in the Element select Portfolio Valuation – Simple (value only).
When you click on the following window will pop up. Here you get to select which entities are included in the report and choose how your report is sorted and grouped. You can also choose to apply any of the table formats that have been saved on your site. Click on Done to get the codes.
Activity 4a
Work with your facilitator to include the Current Asset Allocation and pie chart for the client, partner and joint portfolios. Also a table and chart for all the portfolios combined.
<:=$client.DoReport.ips.assetallocationcombined(portfolios='AX', date='Today', exclude_subfunds='on', sort='asset_class_name', group='AAValue', table_format='Coding Workshop Temp'):>
<:=$client.DoReport.ips.assetallocation(portfolios='AX', date='Today', exclude_subfunds='on', group='AAValue'):>
Activity 4b
Work with your facilitator to include the proposed changes to the Portfolio.
<:=$client.DoReport.ips.proposal(portfolios='AX', date='Today', exclude_subfunds='on', sort='code', group='Product'):>
Activity 4c
Work with your facilitator to include the proposed Asset Allocation and pie chart for the client, partner and joint portfolios. Also a table and chart for all the portfolios combined.
<:=$client.DoReport.ips.proposedonlyassetallocationcombined(portfolios='AX', date='Today', exclude_subfunds='on', sort='asset_class_name', group='AAValue', table_format='Coding Workshop Temp'):>
<:=$client.DoReport.ips.proposedassetallocation(portfolios='AX', date='Today', exclude_subfunds='on', group='AAValue'):>
We can exchange the ‘CX’ (Client Portfolio) in the code above with:
‘PX’ to perform the same test on the ‘Partner’ portfolio
‘JX’ to perform the same test on the ‘Joint’ portfolio
‘AX’ to perform the same test for all entities in a client group
‘OX’ to perform the same test for all linked entities
Portfolio Account Filtering:
Note: Portfolio Accounts were previously known as ‘Subfunds’, hence the codes containing the term ‘subfund’. In XPLAN 2.8, these codes containing the word ‘subfund’ are in use and are correct.
This allows you to code reports from IPS with more flexibility that you can choose to include or exclude Portfolio Accounts in different sections.
For example you might have both superannuation and investments assets datafeeding into IPS although in separate Portfolio Accounts. You can choose to bring the super assets into a super section and the other assets into another section for investments. The filters are set up per client.
There are 3 options; ON, OFF and INVERTED
ON: It will apply any filters that have been applied within IPS:
<:=$client.DoReport.ips.holdings(date='Today', group=’Holding’, exclude_subfunds=’on’):>
OFF: Eliminates any Portfolio Account exclusions selected in IPS:
<:=$client.DoReport.ips.holdings(date='Today', group=’Holding’, exclude_subfunds=’off’):>
INVERTED:
This will reverse the ‘ON’ option:
<:=$client.DoReport.ips.holdings(date='Today', group=’Holding’, exclude_subfunds=’inverted’):>
To apply these filters to the Portfolio Accounts within IPS, go to IPS – Reports – Filters.
Chart Height, Width and Font Size
A number of IPS charts are included in the reports that can be inserted using Xmerge. When inserting charts you may need to resize them in order to fit nicely on the page. Height, width and font size parameters can be used in the code to fine tune the appearance of your IPS charts.
Example:
See how the width, height and font_size parameters have been used to fit this proposed asset allocation chart to a portrait A4 page.
Xmerge Code
Many of the IPS reports involving charts can be included in Xmerge output as Smart IPS components. These Smart IPS components allow customisation of the size, colour, charts, legends and fonts of the individual components within an Xmerge report.
If a custom report view has been created for one of the reports that is available, then the unique custom report view ID number can be used in the Xmerge syntax to utilise the custom report view.
Smart IPS components are available to insert and configure from the XWord toolbar.
This topic contains the following:
Example Xmerge output using Smart IPS components
Available Components
Xmerge Syntax
Report Names
Component Parameters
Legend Options
Report Views
XWord Toolbar
Example Xmerge Syntax
Actual Asset Allocation Pie Chart
Performance Benchmark (TWRR)
Performance Benchmark (TWRR) (Line Chart)
Performance Benchmark (TWRR Daily Calc.)
Performance Benchmark (TWRR Daily Calc.) (Line Chart)
Portfolio Performance vs CPI (Chart)
Portfolio Performance vs CPI (Cash Basis) (Chart)
Portfolio Performance Summary w/ Benchmarks (Chart)
Proposed Asset Allocation Pie Chart
Quarterly Portfolio Performance w/ Benchmarks (Chart)
11.1 Example Xmerge output using Smart IPS components
11.2 Available Components
Actual Asset Allocation Column Chart
Actual Asset Allocation Pie Chart
Defensive vs Growth Asset Allocation Pie Chart
Performance Benchmark (TWRR)
Performance Benchmark (TWRR) (Line Chart)
Performance Benchmark (TWRR Daily Calc.)
Performance Benchmark (TWRR Daily Calc.) (Line Chart)
Portfolio Performance vs CPI (Chart)
Portfolio Performance vs CPI (Cash Basis) (Chart)
Portfolio Performance Summary w/ Benchmarks (Chart)
Portfolio Progress Chart
Portfolio, Proposed Portfolio & Market Sector Allocation (ASX200)
Portfolio vs Market Sector Allocation (ASX200)
Proposed Asset Allocation Pie Chart
Quarterly Portfolio Performance w/ Benchmarks (Chart)
Risk Profile Asset Allocation Pie Chart
Target vs Actual Asset Allocation Column Chart
Target vs Actual Asset Allocation Column Chart (Weight)
11.3 Xmerge Syntax
Report Names
Report | Syntax |
Actual Asset Allocation Column Chart | $client.DoReport.ips.assetallocationcolumn |
Actual Asset Allocation Pie Chart | $client.DoReport.ips.assetallocation |
Defensive vs Growth Asset Allocation Pie Chart | $client.DoReport.ips.assetallocation_withdefandgrowth_chart |
Performance Benchmark (TWRR) | $client.DoReport.ips.twrr |
Performance Benchmark (TWRR) (Line Chart) | $client.DoReport.ips.twrr_linechart |
Performance Benchmark (TWRR Daily Calc.) | $client.DoReport.ips.twrr_daily |
Performance Benchmark (TWRR Daily Calc.) (Line Chart) | $client.DoReport.ips.twrr_daily_linechart |
Portfolio Performance vs CPI (Chart) | $client.DoReport.ips.performanceovertime_chart |
Portfolio Performance vs CPI (Cash Basis) (Chart) |
$client.DoReport.ips.performanceovertime_settledate_chart |
Portfolio Performance Summary w/ Benchmarks (Chart) |
$client.DoReport.ips.performance_benchmark_summary_chart |
Portfolio Progress Chart | $client.DoReport.ips.valuation_series |
Portfolio, Proposed Portfolio & Market Sector Allocation (ASX200) | $client.DoReport.ips.PortfolioVsProposedVsASX200_AssetAllocatio n |
Portfolio vs Market Sector Allocation (ASX200) | $client.DoReport.ips.PortfolioVsASX200_AssetAllocation |
Proposed Asset Allocation Pie Chart | $client.DoReport.ips.proposedassetallocation |
Quarterly Portfolio Performance w/ Benchmarks (Chart) | $client.DoReport.ips.performance_benchmark_quarter_chart |
Risk Profile Asset Allocation Pie Chart | $client.DoReport.ips.assetallocationrp |
Target vs Actual Asset Allocation Column Chart | $client.DoReport.ips.agreedversusactual |
Target vs Actual Asset Allocation Column Chart (Weight) | $client.DoReport.ips.agreedversusactual_weightchart |
Component Parameters
Parameter | Syntax | Values | Example | Notes |
Custom colours | custom_colours = |
'x<Any hexadecimal HTML colour code>' |
custom_colours='xFF3300,xFF33 00' |
xFF3300 = red |
Custom legend (allows custom Legend Options) |
custom_legend= | 0 = no, 1 = yes | custom_legend=1 | |
Font family | font_family= | 'Any Windows font name' |
font_family='Arial' If no value is | If no value is specified, the high chart default font (Verdana) will be used |
Font size (pt) | font_size= | Any numeric value | font_size=8 | If no value is specified, the high chart default font size will be used |
Height of component (cm) |
height= | '<Any decimal numerical value>cm' |
height='4.5cm' | |
Width of component (cm) |
width= | '<Any decimal numerical value>cm' |
width='7.2cm' |
Legend Options
Option | Syntax | Values | Example | Notes |
Field alignments | 'field_alignments': | 'left', 'right', ‘center’ | 'field_alignments':'left, right' | If no value is specified it will check the field type from fields |
Field in legend | 'fields': | 'Any valid field names' | 'fields': 'className,value' | |
Field titles | 'field_titles': | 'Any alphanumeric values' | 'field_titles':'Asset Class,Value' | |
Field widths (px) | 'field_widths': | '<numeric value>px' | 'field_widths': '25px,15px' | |
Font family | 'font_family': | 'Any Windows font name' | 'font_family':'Arial' | If no value is specified, the font family used in the Word document will be used |
Font size (pt) | 'font_size': | Any numeric value | 'font_size':8 | If no value is specified, the font size used in the Word document will be used |
Maximum characters in field | 'field_max_chars': | Any numeric value | 'max_chars':20 | |
Number of Columns | 'columns': | Any numeric value | 'columns':3 | |
Number of Rows | 'rows': | Any numeric value | 'row':2 | |
Position | 'position': | 'top', 'bottom', 'left', 'right' | 'position':'top' | |
Width of legend (cm) | 'width': | '<Any decimal numerical value>cm' | 'width':'7.4cm' |
11.4 Report Views
To use a custom report view you must use a slightly different syntax. Firstly, add the suffix '_rv_<report view ID number>' to the report name syntax. For example, the syntax for a Performance Benchmark (TWRR) report with a custom report view ID number of 10891 would be:
$client.DoReport.ips.twrr_rv_10891
The report view ID number can be found by using the XWord toolbar to insert the report from the Element Menu List.
Additionally, as some custom report views include more than one chart, the syntax for these elements is different. For example, the syntax for a report that featured both an actual and a target chart would use the chart IDs 'actual' and 'target' in this format:
charts={'actual':{'custom_legend':1, 'width':'3.5cm', 'height':'3.5cm', 'legend_options':{'position':'bottom', 'fields':'className', 'field_alignments':'right'}}, 'target':{'custom_legend':1, 'width':'4.5cm', 'height':'4.5cm', 'legend_options':{'position':'top', 'fields':'className', 'field_alignments':'right'}}}
All other syntax elements are the same as in all other Smart IPS components.
A complete example for a custom report view of an Actual Asset Allocation Pie Chart with a report view ID number of 10391 and containing an actual chart:
<:=$client.DoReport.ips.assetallocation_rv_10391(portfolios='AX', date='Today',
exclude_subfunds='on', group='AAValue', charts={'actual':{'custom_legend':1, 'width':'3.5cm', 'height':'3.5cm', 'legend_options': {'position':'bottom', 'fields':'className', 'field_alignments':'right'}}}):>
11.5 XWord Toolbar
The XWord toolbar can be used to create Smart IPS components in the same way that all other portfolio reports are generated.
The difference for reports that have Smart IPS Components enabled is that the Portfolio Report Options dialog box will have the Chart tab enabled, allowing you to enter the component parameters and legend options.
The top field, located under the Chart tab, lists the chart IDs and descriptions of the charts you can select to customise. Only if you have selected a custom report view will there be more than one chart listed. For example, if you selected a custom report view of an Actual Asset Allocation Pie Chart which contained an actual chart and a target chart, then actual - Actual Asset Allocation and target - Target Asset Allocation would both be listed.
11.6 Example Xmerge Syntax
Actual Asset Allocation Pie Chart
<:=$client.DoReport.ips.assetallocation(portfolios='AX', date='Today', exclude_subfunds='on', group='AAValue', width='3cm', height='3.5cm', custom_legend=1, legend_options={'position':'right', ‘field_titles’:’Asset Name, Value ($), Weight (%)’, 'fields':'className,value,weight', ‘field_widths’:’30px,15px,15px’, ‘width’:’7cm’}):>
Performance Benchmark (TWRR)
<:=$client.DoReport.ips.twrr(portfolios='CX', date='Last 12 Months (Day)', exclude_subfunds='on', width='8.2cm', height='4.5cm', custom_legend=1, legend_options={'position':'top'}):>
Performance Benchmark (TWRR) (Line Chart)
<:=$client.DoReport.ips.twrr_linechart(portfolios='CX', date='Last 12 Months (Day)', exclude_subfunds='on', width='8.2cm', height='4.5cm', custom_legend=1, legend_options={'position':'top'}):>
Performance Benchmark (TWRR Daily Calc.)
<:=$client.DoReport.ips.twrr_daily(portfolios='CX', date='Last 12 Months (Day)', exclude_subfunds='on', width='8.2cm', height='4.5cm', custom_legend=1, legend_options={'position':'top'}):>
Performance Benchmark (TWRR Daily Calc.) (Line Chart)
<:=$client.DoReport.ips.twrr_daily_linechart(portfolios='CX', date='Last 12 Months (Day)', exclude_subfunds='on', width='8.2cm', height='4.5cm', custom_legend=1, legend_options={'position':'top'}):>
Portfolio Performance vs CPI (Chart)
<:=$client.DoReport.ips.performanceovertime_chart(portfolios='CX', date='Today', exclude_subfunds='on', width='8.2cm', height='4.5cm', custom_legend=1, legend_options={'position':'top'}):>
Portfolio Performance vs CPI (Cash Basis) (Chart)
<:=$client.DoReport.ips.performanceovertime_settledate_chart(portfolios='CX', date='Today', exclude_subfunds='on', width='8.2cm', height='4.5cm', custom_legend=1, legend_options={'position':'bottom'}):>
Portfolio Performance Summary w/ Benchmarks (Chart)
<:=$client.DoReport.ips.performance_benchmark_summary_chart(portfolios='CX', date='Today', exclude_subfunds='on', width='8.2cm', height='4.5cm', custom_legend=1, legend_options={'position':'bottom', ‘columns’:2, ‘max_chars’:20, ‘rows’:2}):>
Proposed Asset Allocation Pie Chart
<:=$client.DoReport.ips. proposedassetallocation(portfolios='AX', date='Today', exclude_subfunds='on', group='AAValue', width='6cm', height='4.5cm', custom_legend=1, legend_options={'position':'bottom', 'columns':1,'fields':'className,value'}):>
Quarterly Portfolio Performance w/ Benchmarks (Chart)
<:=$client.DoReport.ips.performance_benchmark_quarter_chart(portfolios='CX', date='Today', exclude_subfunds='on’, width='8.2cm', height='4.5cm', custom_legend=1, legend_options ={'position':'top',‘columns’:2, ‘max_chars’:28}):>
To insert an output from XTools/+ simply follow these basic steps:
Inside XPLAN find the output page you want to display in your document. In the top right corner of the display you will see the path you will need to add from the XWord toolbar.
If you were inserting the CALM output below, the path to be inserted in the XWord toolbar would be ‘Display’ > ‘Individual’ > ‘Cashflow’ > ‘Consolidated’.
Select ‘XTools’ in the first dropdown menu on the XWord toolbar and select the XTool in the second. In this example the XTool is CALM.
In the third dropdown list find the start of the path you are trying to insert.
Select it and click ‘Insert Element’
Since the path we are inserting is ‘Display’ > ‘Individual’ > ‘Cashflow’ > ‘Consolidated’ we should select ‘Output/Display/Individual’ as this coincides with the first two elements of our path.
Use the XTools path builder to build the rest of your path by selecting from the list of path elements in the ‘Add Path Element’ dropdown menu. Click ‘Add Path Element’ once you have made your selection and then select the next element until you have built your path.
First selected ‘Cashflow’ and clicked ‘Add Path Element’. Now selecting ‘Consolidated’ to get a path of ‘Output/Display/Individual/Cashflow/Consolidated’
Insert the code for the Individuals assets screen of XTools+.
Insert the code for the individuals superannuation screen.
Insert the code for the SMSFs assets screen.
13.1 Inserting Xtools/+ Charts and Stand Alone Values
Charts from the XTools are inserted in exactly the same way as the output display above. You will simply need to build the correct path to insert the chart in exactly the same way.
13.2 Including more than one Xtools/+ Scenario
This is to compare two scenarios from the one calculator (for example to compare current and proposed situation).
You need to modify the original and rename the scenario name:
<:=$uda('xtools/output/client%clientid%/CALM/scenario%scenario%/Chart/Individual/CALM', 'image', View_All=1, Hide_Nulls=1):>
The scenario name is held within the % and %, in the above example it is (which is the default when coding from the toolbar): %scenario%
Therefore to include the same output for more than one scenario, simply have the same code twice with different names between the %’s.
Current:
<:=$uda('xtools/output/client %clientid%/CALM/scenario%Current%/Chart/Individual/CALM', 'image', View_All=1, Hide_Nulls=1):>
Proposed:
<:=$uda('xtools/output/client%clientid%/CALM/scenario%Proposed%/Chart/Individual/CALM', 'image', View_All=1, Hide_Nulls=1):>
When the template is uploaded, XPLAN will recognize that there are two variables Current and Proposed, as shown below:
13.3 Xtools/+ comparison charts
Comparison charts can be effective ways of showing more than one scenario in a template. To view these on XPLAN you hit ‘Compare’ on the Scenario Index screen. The comparison charts can also be coded into templates. See below for an example on XTools+ comparison charts.
Net Cashflow Comparison Chart
<:=$uda('xtools/output/client %clientid%/CALM/cmpchart/scenario %Scenario1%/scenario%Scenario2%/scenario %Scenario3%/Cashflow|Net Cashflow', 'image', View_All=2, Hide_Nulls=1):>
To insert Risk Researcher items, the following steps can be taken:
XWord includes functions which will extract details of the current portfolios for the clients. These functions can be accessed by changing the entities to Code Library and then selecting the appropriate Category and Element to get the desired output.
The syntax below needs to be declared at the start of the template once only. Within the document required, use ONE of the below depending on how you are running the template
Use the below if Risk Researcher was completed as normal in the client file (outside a scenario wizard):
<:let dummy =$uda('redirect/client %clientid%/Needs Analysis/iqm+scenario %RR_scenario%/_created’):>
<:let scenario=$client.iqm2_scenario($var('%RR_scenario%')):>
Use the below if Risk Researcher was completed within a Scenario Wizard:
<:let scenario=$client.iqm2_scenario($uda('insurance/scenarios/%clientid%/scenario_%domain%/%RR_scenario%/id')):>
*Domain refers to the Scenario Group name given to the scenario wizard.
14.1 Needs Analysis
The codes below will allow the user to pull through the Risk researcher >> Client - Needs pages in a nice format:
Codes:
Client Needs:
<:=$uda('xtools/output/client %clientid%/Needs Analysis/iqm+scenario %scenario%/Display/Client Needs',
View_All=1, Hide_Nulls=2, Start=1, End=1, Frequency=1):>
Like with XTools and XTools+ coding, remember to change the %scenario% section of code above to your preferred scenario name.
Use XPLAN Help to locate codes for the following items and insert them in this document:
Needs Analysis
Existing Insurance by cover
Recommend Insurance Details
Change the above code to bring through the Partner details.
14.2 Recommendation Table:
The table of codes below will bring through the recommendations and Notes into a well formatted table:
<:let dummy=$uda('redirect/client %clientid%/Needs Analysis/iqm+scenario %scenario%/Input/Salary/Client
Salary Income/Formatted Value'):>
<:let scenario=$client.iqm2_scenario($var('%scenario%')):>
<:for rec in scenario.recommendations:>
<:=rec.underwriter:> |
Owner: |
Premium: |
Notes: |
<:=rec.product_name:> |
<:=rec.owner_name:> |
<:=rec.premium_amount:><:=rec.premium_frequency_suffix:> |
<:=rec.notes:> |
<:for cover in rec.covers:> |
|||
<:=cover.cover_type:> |
<:=cover.life_insured_name:> |
<:=cover.status:> |
<:=cover.benefit_amount:><:=cover.benefit_frequency_suffix:> |
<:end:>
<:end:>
Use XPLAN Help to locate the codes for the following items.
Risk Recommendations - Listing the Insurance Policies
Risk Products – Fees and Commission
Graphs – Premium Estimates
Copy and Paste the codes from Help to this document.
When designing a template you should be looking to produce document that requires as little editing as possible while maintaining a simple and easy to follow method of entering data to prepare the document.
The best way to do this is by carefully planning your template to handle all of the common situations in which it will be used.
Generally it is good to base the layout of information in your document on what you know Xmerge can handle. This will mean the difference between having a result that needs editing and a result that does not.
More specifically there are three things you can do to significantly increase the efficiency of your template. These are:
Prepare the standard text for the strategies that you commonly recommend. This standard text can then be included in your document based on recommended strategies selected in XPLAN.
Prepare the standard text that is associated with the products that you commonly recommend. This should include all information required for compliance, such as the basis for recommending the product and any required disclaimers. This standard text can then be included in the document based on the products recommended in IPS.
Design your fees and disclaimer section to make use of the fees table produced by IPS. This will remove the need for editing fee tables in the merge result.
If you can successfully apply these three principals to your template, you will be able to eliminate most post merge editing of your document, which will significantly reduce the overall time taken to prepare it.
Invest the time at the outset to properly design and finish your templates. Efficient templates will double the value of the way your XPLAN software works for your business.
Take responsibility for your templates. If you have taken an active role in building your templates you will be less reliant on XPLAN when you need to update or make changes to them. It will cost you less and enable you to slowly perfect your template over time.
Test, test, test... You will only perfect your template through thorough testing. Take the time to do this and you’ll save time later.
Summary
Congratulations! You have completed the Coding Essentials course.
Review Learning Outcomes
You will now be able to:
Use the XWord toolbar
Understand the basis for XPLAN coding
Code a basic letter
Include information using ‘if’ and ‘else’ statements
Incorporate tables into their documents
Include IPS charts and reports
Column Totals
In cases where one or more of the columns in a table may hold a dollar value, it may be desirable to display a column total. The total for a given column will be equal to the sum of all items in that field from the group.
The general syntax for Xmerge code to product this value is as follows:
<:=$client.<group name>.sum('<field name>'):>
Example
Using the "fund" group (where superannuation fund details are stored in client focus)
Calculating the sum of the "undeducted" field:
<:=$client.fund.sum(‘fund_undeducted’):>
To display this in a currency format with 2 decimal places:
$<:=currency($client.fund.sum(‘fund_undeducted’).value,2):>
(The currency function takes a normal number eg. 10000000 and formats it as currency eg. 10,000,000.00)
Once the column total has been obtained using the sum function as above, it can be inserted into another row at the bottom of the table as below:
Description | Owner | Market Value |
<:for item in $client.asset:>
<:=item.type_group:> / <:=item.type:> <:=item.desc:> |
<:=item.owner:> |
$<:=item.amount:> |
<:end:>
Total |
$<:=currency($client.asset.sum(‘amount’).value,0):> |
This will produce an output similar to that below:
Description | Owner | Market Value |
Investments / Stocks AMP Shares |
Client | $20,000 |
Investments / Other Investments ABC Investment |
Joint | $50,000 |
Real Estate / Primary Residence 26A Koogee Bubba Street St. Kilda |
Joint | $500,000 |
Retirement / Superannuation MLC Plan Zero |
Client | $8,000,000 |
Total |
$8,614,000 |
Summing values from a ‘Field Group’
To sum a numeric field within a group use the following syntax:
<:=$client.<list name>.sum('<field name>'):>
Example
Using the "fund" group (where superannuation fund details are stored in client focus)
Calculating the sum of the "undeducted" field:
<:=$client.fund.sum(‘fund_undeducted’):>
To display this in a currency format with 2 decimal places:
$<:=currency($client.fund.sum(‘fund_undeducted’).value,2):>
The ‘.value’ forces the result of the sum function to be a floating point number.
The currency helper function can be used to convert an integer or floating point number into a nice currency format. The syntax should be as follows:
<:=currency(<floating point number>,<number of decimal places>):>
NOTE:
The floating point number in this example is the sum of the undeducted field and the number of decimal places is two.
XMaths
Often it is useful to perform simple arithmetic on values held in XPLAN to display in documents. The example that we will use calculates the GST on an annual fee amount and the total amount payable. Casting a Dollar Value to a Float The main figure that we will be working with here is the annual fee amount. This is stored in XPLAN as a currency value. We can only perform arithmetic on values that are represented as numbers in XPLAN so we need to convert currency values into something that we can work with, which is a ‘Float’; See below:
Annual Fee $ Value = <:=$client.annual_fee:>
Annual Fee Float Value = <:=$client.annual_fee.value:>
All ‘Currency’ values from XPLAN must be converted to ‘Float’ format if you want to perform arithmetic on them.
Basic Arithmetic
Now to do the calculations...
Annual Fee (float) = <:=$client.annual_fee.value:>
Simple Multiplication
GST Amount = Annual Fee x 10%
GST Amount (float) = <:=$client.annual_fee.value*0.1:>
Simple Addition
Total Amount Payable = Annual Fee + GST Amount
Total Amount Payable (float) = <:=$client.annual_fee.value + $client.annual_fee.value*0.1:>
Other
Other simple operations such as division and subtraction can also be used in this way.
The Currency Function
The currency helper function can be used to convert an integer or floating point (float) number into a nice currency format. The syntax should be as follows:
<:=currency(<floating point number>,<number of decimal places>):>
In this case we now have two values that we want to display as currency values and we can now convert our floats back.
GST Amount ($) = $<:=currency($client.annual_fee.value*0.1,2):>
Total Amount Payable ($) = $<:=currency($client.annual_fee.value + $client.annual_fee.value*0.1,2):>
Note: The ‘,2’ at the end indicates display to two decimal places.
Example
The following calculates the total value of all the lifestyle assets stored in the assets table in ‘Client Focus’:
<:=$client.asset.filter(‘type_group=5’).sum(‘amount’):>
Where 5 is the value assigned to the type_group for lifestyle assets in XPLAN.
The currency function can be used in the same way as above to format the output.
The Currency Function for XTOOLS+ Single Values
The below is the code for the value of a clients superannuation balance at retirement:
<:=$uda('redirect/client %clientid%/CALM/scenario %scenario%/Results/Super Accumulation at Retmt Client/Unformatted Value', View_All=1, Hide_Nulls=1):>
That will give you the following output (if the clients super value at retirement is $100,000.00): 100,000
To be able to show this value as a dollar figure you need to edit the code as below:
$<:=currency($uda('redirect/client %clientid%/CALM/scenario %scenario%/Super/Client/Opening Value/Projections/Period1', View_All=2, Hide_Nulls=1).value,0):>
This will first cast the figure as an integer then convert this to a currency figure, and would be displayed as below:
$100,000
If you would like this to be displayed with decimal points, simply change the number at the end of the code to the number of decimal points you prefer.
Example, to give the above example 2 decimal points:
$<:=currency($uda('redirect/client %clientid%/CALM/scenario %scenario%/Super/Client/Opening Value/Projections/Period1', View_All=2, Hide_Nulls=1).value,2):>
Arithmetic Using Totals
Xmaths can then be used to perform simple arithmetic on the results of these sum functions:
Example
Adding the total amount of undeducted money to the total lifestyle assets from assets table in client focus (not that anyone would ever want to use this example):
<:=$client.fund.sum(‘fund_undeducted’).value+$client.asset.filter(‘type_group=5’).sum(‘amount’).value:>
Value must be added to the end of the sum functions so that floating point results can be using XCMath
The example above uses addition. Subtraction multiplication ‘*’ and division ‘/’ can all also be used to perform arithmetic in XWord.
The currency function can be used to format this result.
Asset & Liabilities Tables
Here is an example of how XMaths, conditional codes and the group presentation principals that have been discussed have been used to produce a tidy display of assets and liabilities for clients.
Note: This document has not discussed how to produce the ‘Financial Assets’ table below.
Lifestyle Assets
<:if len($client.asset):>
Personal Assets |
Owner |
Market Value |
<:for item in $client.asset:>
<:=item.type_group:> / <:=item.type:> <:=item.desc:> |
<:if item.owner.value == ‘Client’:> <:=$client.last_name:>, <:=$client.first_name:> <:end:> <:if item.owner.value == ‘Partner’:> <:=$partner.last_name:>, <:=$partner.first_name:> <:end:> <:if item.owner.value == ‘Joint’:> <:=$client.first_name:> & <:=$partner.first_name:> (Joint) <:end:> |
$<:=item.amount:> |
<:end:>
Total |
|
$<:=$client.total_assets :> |
<:else:>
You have not advised us that you have any lifestyle assets.
<:end:>
Financial Assets
<:if float(map(lambda x: x.startswith('(') and ('-'+x[1:]) or x, [filter(lambda x: x in '0123456789.(',$client.DoReport.ipsv.portfolio_value(valtype='value', portfolios='AX', date='Today'))])[0]):>
InvestmentAssets | Owner | Market Value |
<:for e in $client.DoReport.ipsv.portfolios(‘value’):>
<:for a in $client.DoReport.ipsv.valuation (‘value’, portfolioids= e[‘portfolioid’]):>
<:=a[‘description’]:> | <:=a['portfolioid']:> | <:=a[‘value’]:> |
<:end:>
Total | <:=$client.DoReport.ips v.portfolio_value(portfoli os='AX', date='Today'):> |
<:else:>
You have not advised us that you have any investment assets.
<:end:>
Liabilities
Loan Type | Owner | Outsanding balance |
<:if len($client.liability):>
<:=item.type:> <:=item.inst:> |
<:if item.owner.value == ‘Client’:> <:=$client.last_name:>, <:=$client.first_name:> <:end:> <:if item.owner.value == ‘Partner’:> <:=$partner.last_name:>, <:=$partner.first_name:> <:end:> <:if item.owner.value == ‘Joint’:> <:=$client.first_name:> & <:=$partner.first_name:> (Joint) <:end:> |
$<:=item.amount:> |
<:end:>
Total | $<:=$client.total_liabiliti es:> |
<:else:>
You have not advised us that you have any liabilities.
<:end:>
Total Net Worth | $<:=currency(float($client.total_assets.value) + float(map(lambda x: x.startswith('(') and ('- '+x[1:]) or x, [filter(lambda x: x in '0123456789 (', $client.DoReport.ipsv.portfolio_value(valtype=' value', portfolios='CX,PX,JX', date='Today'))])[0]) - float($client.total_liabilities.value),2):> |
Name of Company | <:=company.entity_name:> |
Name of Directors |
<:for item in company.director:> <:=item.fname:> <:=item.lname:> <:end:> |
Name of Shareholders |
<:for item in company.shareholder:> <:=item.fname:> <:=item.lname:> <:end:> |
Name of Ownership |
<:for item in company.shareholder:> <:=item.share:> <:end:> |
TFN | <:=company.tfn:> |
ABN | <:=company.abn:> |
<: for trust in $trust:>
Trust Name | <:=trust.entity_name:> |
Name of Trustee(s) |
<:for item in trust.trustee:> <:=item.fname:> <:=item.lname:> <:end:> |
Beneficiary Names |
<:for item in trust.beneficiary:> <:=item.fname:> <:=item.lname:> <:end:> |
TFN | |
ABN |
In a Statement of Advice there is content that applies under certain circumstances; as an example, text will need to be included or excluded depending on what strategies you recommend or the sections to be included in the document varied depending on the scope of advice.
Often advisers have a general statement of advice template which includes everything and each time they do a plan they just delete all of the content that is not needed. In an efficient Statement of Advice template, Xmerge conditions are placed so that content is included or excluded based on the information stored in XPLAN which eliminates the need for someone to go through and delete out all the parts that aren’t needed.
Including Content Based on Tick Boxes
Example
We have created a field in XPLAN called ‘Scope of Advice’. Note that in this example we have only selected ‘Risk’.
Below are two paragraphs of standard text which are to be included based on which boxes are ticked in the ‘Scope of Advice’ field. We can insert conditions around these paragraphs to achieve this using the Xword toolbar.
Estate Planning
It is important that you maintain a current Will by having it reviewed by a legal professional on a regular basis.
Risk Insurance
It is important that you have enough insurance cover to ensure that your partner or family are left comfortable in the event of an accident that may leave you unable to work or in the event of death…
To insert the conditions:
In this example we would put a condition around each of the paragraphs coinciding with the check box which determines its inclusion.
The two paragraphs with conditions inserted are shown below.
<:if filter(lambda x: x in ['Estate Planning'], map(str,$client.valueOf('scope_of_advice'))) :>
Estate Planning
It is important that you maintain a current Will by having it reviewed by a legal professional on a regular basis etc.
<:end:>
<:if filter(lambda x: x in ['Risk'], map(str,$client.valueOf('scope_of_advice'))) :>
Risk Insurance
It is important that you have enough insurance cover to ensure that your partner or family are left comfortable in the event of an accident that may leave you unable to work or even dead etc.
<:end:>
The merge result of the code above, in our case where only ‘Risk’ has been ticked in the ‘Scope of Advice’ field would simply be.
Risk Insurance
It is important that you have enough insurance cover to ensure that your partner or family are left comfortable in the event of an accident that may leave you unable to work or even dead etc. That is the ‘Estate Planning’ paragraph has been omitted because the ‘Estate Planning’ box was not ticked.
Start and End Date Variables
Coding reports to use a start and end date variable allows the user to specify a start date and an end date for the Portfolio report specified. This allows the user to run reports over non-standard periods. The ‘Transaction Summary’ report has been used in the example below and the start and end date variables have been named start_date_YYYYMMDD and end_date_YYYYMMDD respectively.
Transaction Summary using start and end date variables
<:=$client.DoReport.ips.transactions(portfolios='AX', date='%start_date_YYYYMMDD%- %end_date_YYYYMMDD%', sort='tradedate', group='Holding', table_format=’Generic’):>
To use a start and end date variable you can insert the red text above into the same position in any of the IPS reports that apply over a set period.
End Date Variable Only
An end date variable on its own can be used with most IPS reports. This enables the end date to be set:
Portfolio Valuation report using an end date variable
The end date variable has been named ‘effective_date_YYYYMMDD’
<:=$client.DoReport.ips.holdings(portfolios='AX', date='Today', exclude_subfunds='on', end_date='%effective_date_YYYYMMDD%', sort='code', group='Portfolio,Holding', table_format='Review'):>
The code above was inserted using the Xword toolbar. Simply check the ‘Use End Date Variable’ checkbox and enter the variable name into the ‘End Date Variable’ field.
Total Portfolio Value
While most of the information we code into templates from IPS is in report form, there is one individual value which is particularly useful for use as a standalone value. This is the total portfolio value.
Standalone values can be found in the XWORD Toolbar:
The code to insert the client’s total portfolio value is as follows (Total value of client portfolio in currency format):
$<:= currency(float(map(lambda x: x.startswith('(') and ('-'+x[1:]) or x, [filter(lambda x: x in '0123456789.(', $client.DoReport.ipsv.portfolio_value(valtype='value', portfolios='CX', date='Today'))])[0]),2):>
Total value of client, partner and joint portfolio (Total value of client portfolio in currency format):
$<:= currency(float(map(lambda x: x.startswith('(') and ('-'+x[1:]) or x, [filter(lambda x: x in '0123456789.(', $client.DoReport.ipsv.portfolio_value(valtype='value', portfolios='CX,PX,JX', date='Today'))])[0]),2):>
Total portfolio value for client, partner, joint and all related entities (Total value of client portfolio in currency format):
$<:= currency(float(map(lambda x: x.startswith('(') and ('-'+x[1:]) or x, [filter(lambda x: x in '0123456789.(', $client.DoReport.ipsv.portfolio_value(valtype='value', portfolios='AX', date='Today'))])[0]),2):>
By stripping the currency format from this code we can use this value in arithmetic using Xmaths. See the ‘Total Net Worth’ calculation from the ‘Advanced Field Group Presentation’ section for an example of where this has been done.
Test for Portfolio Value Greater than Zero
The code below performs a check on a portfolio to test whether the balance is greater than zero. This is can be useful when presenting information that is only relevant if the client has a portfolio balance.
<:if (float(map(lambda x: x.startswith('(') and ('-'+x[1:]) or x, [filter(lambda x: x in '0123456789.(', $client.DoReport.ipsv.portfolio_value(valtype='value', portfolios='CX', date='Today'))])[0])):>
This text will be shown if the Client’s portfolio value is greater than zero.
<:end:>
The ‘Inserting IPS Reports’ section above we looked at inserting reports with a table format applied. This is the simplest way to apply a table format however it is fairly simple to insert the code manually to Xtools/+ and IPS code which may have been inserted previously.
XTools Tables
To apply a table format to tables produced by XTools or XTools+ code, insert the following at the end of the string:
, format=’Format_Name’
The example below applies the “Classic” table format to the Individual > Cashflow > Consolidated table from XTools+…
<:=$uda('xtools/output/client %clientid%/CALM/scenario %scenario%/Display/Individual/Cashflow/Consolidated', View_All=1, Hide_Nulls=2, format=’Classic’):>
Portfolio (IPS) Tables
To apply a table format to tables produced by IPS code, insert the following at the end of the string:
, table_format=’Format_Name’
The example below applies the “Classic” table format to the “Financial Assets” table from IPS:
<:=$client.DoReport.ips.financial_assets(portfolios='AX', date='Today', sort='portfolioid', group='Subfund', table_format='Classic'):>
Note: The table format needs to exist in XPLAN before it can be applied to tables produced by Xmerge. Please see the XPLAN Help menu for more information on creating table formats in your XPLAN site.
The following codes are to compare two scenarios from one calculator (for example to compare current and proposed situation).
In order to compare 2 scenarios, you will be able to copy the original code, as below:
<:=$uda('xtools/output/client %clientid%/CALM/scenario%scenario%/Chart/Individual/CALM', 'image', View_All=1, Hide_Nulls=1):>
And change the %Scenario% name, with the desired Scenario display on the interface.
The scenario name is held within the % and %, in the above example it is (which is the default when coding from the toolbar):
%scenario%
Therefore to include the same output for more than one scenario, simply have the same code twice with different names between the %’s.
Current:
<:=$uda('xtools/output/client %clientid%/CALM/scenario%Current%/Chart/Individual/CALM', 'image', View_All=1, Hide_Nulls=1):>
Proposed:
<:=$uda('xtools/output/client %clientid%/CALM/scenario%Proposed%/Chart/Individual/CALM', 'image', View_All=1, Hide_Nulls=1):>
Then when the template is uploaded, XPLAN will recognize that there are two variables Current and Proposed, as shown below:
These are the codes to manipulate the way the date is displayed in the merged output.
The full coding would be <:=datetime_merge.format('%A %B %d, %Y'):>
% A = Locale's full weekday name = Wednesday
%B= Locale's full month name. = May
%d= Day of the month as a decimal number [01,31]. = 11
%Y= Year with century as a decimal number. = 2005
Dlrectlve | Meaning | Notes |
%a | Locale's abbreviated weekday name. | |
%A | Locale's full weekday name. | |
%b | Locale's abbreviated month name. | |
%B | Locale's full month name. | |
%c | Locale's appropriate date and time representation. | |
%d | Day of the month as a decimal number [01,31]. | |
%H | Hour (24-hour clock) as a decimal number [00,23]. | |
%I | Hour (12-hour clock) as a decimal number [01,12]. | |
%J | Day of the year as a decimal number [001,366]. | |
%m | Month as a decimal number [01,12]. | |
%M | Minute as a decimal number [00,59]. | |
%p | Locale's equivalent of either AM or PM. | |
%s | Second as a decimal number [00,61]. | (1) |
%U | Week number of the year (Sunday as the first day of the week) as a decimal number [00,53]. All days in a new year preceding the first Sunday are considered to be in week 0. | |
%w | Weekday as a decimal number [0(Sunday),6]. | |
%W | Week number of the year (Monday as the first day of the week) as a decimal number [00,53]. All days in a new year preceding the first Monday are considered to be in week 0. | |
%x | Locale's appropriate date representation. | |
%X | Locale's appropriate time representation. | |
%y | Year without century as a decimal number [00,99]. | |
%Y | Year with century as a decimal number. | |
%Z | Time zone name (no characters if no time zone exists). | |
%% | A literal "%" character. |
From the table, to do a customisation date of Wednesday May 11, 2005, all we need to do would be to extract the components from the table above:
The full coding would be <:=datetime_merge.format('%A %B %d, %Y'):>
% A = Locale's full weekday name = Wednesday
%B= Locale's full month name. = May
%d= Day of the month as a decimal number [01,31]. = 11
%Y= Year with century as a decimal number. = 2005
The merged output will be = Wednesday May 11, 2005
The standard codes are : <:=datetime_merge.format(‘…..'):>
Just change the components.