enfr

Specifying the person

Updated: 2018-08-23

The CurrentClient portion of the field code this tells the Template Editor to look at the visible or active client. There are similar field codes to help you access specify the person whose form and field you wish to access.

Code Description

CurrentClient

Look at visible or active client. This code is relative of what return in the file you are looking at. If you are on the spouse/partner's return, it will look at the spouse's information. Likewise for dependants. This is what makes it possible for the CLetter to work for anyone in the file. 

CurrentSpouse

Look at the spouse of the CurrentClient. This code is relative of where you are in the return. If you are on the spouse/partner's return, it will look at the principal taxpayer's information. Likewise for dependants. This is what makes it possible for the JLetter to work for anyone in the file.

File.Principal

Access the principal taxpayer, even if you are on a dependant's or spouse's return. Unlike CurrentClient, it is not relative to what return in the file you are looking at. You can also use this to trigger repeatable sections. See Repeatable sections help topic.

Useful for relevant and used template properties to check whether the CurrentClient is also the principal taxpayer in the file. For example:

CurrentClient = File.Principal

File.Partner Access the spouse/partner taxpayer, even if you are on a dependant's or principal taxpayer's return. Unlike CurrentSpouse, it is not relative to what return in the file you are looking at. You can also use this to trigger repeatable sections. See Repeatable sections help topic.

File.Dependants

Access information for all dependants in the file.

A basic way to use this is to check whether there are dependants in the file:
{{#File.Dependants}}
This text will show if there are dependants in the file.
{{/File.Dependants}}

Another way to use this is to return a list of the value in a field for all dependants in the file. For example, if there are three dependants in the file, this will give a list of their first names: {{#File.Dependants}}{{Info.ID.FirstName}} {{/File.Dependants}} will create a list a list of those results: Joe Jane Jimmy

File.Clients

Used in repeatable sections, to repeat code for all the clients in the file. This includes principal taxpayer, spouse/partner and all dependants. See Repeatable sections help topic.

{{ aggregate(File.Clients, "1") }}

Count the number of clients in a file. This uses the aggregate function. See the Field codes help topic to learn more.

{{ count(File.Dependants) }}

Count the number dependants in the file.

Useful for relevant and used template properties to check whether there are any dependants in the file at all. For example:

count(File.Dependants) > 0

{{# File.Clients }}
{{# . = File.Principal}}
This is Principal
{{/ . = File.Principal}}
{{# . != File.Principal}}

This is not the principal
{{/ . != File.Principal}}
{{/ File.Clients}}
To treat one of the taxpayers differently, the . (period) will return the value of the CurrentClient, so you can check to see if it matches the Principal.