Menu

Clients and Taxpayers

Updated: 2023-10-12

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

Clients

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.
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 the Repeatable Sections help topic.

aggregate(File.Clients, "1")

Count the number of clients in a file using the aggregate function. See the aggregate() help topic to learn more.

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

Spouse/Partner

Code Description
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 the 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.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.

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 the Repeatable Sections help topic.

Dependants

Code Description
File.Dependants

Access information for all dependants in the file. This looks at the full dependant returns not the number of dependant worksheets.

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}}

Result: Joe Jane Jimmy

Dependant

Access information on the depednant worksheet in them file, including for depedants with full returns.

To check whether there are dependants referenced in the return:

{{#CurrentClient.Dependant}}
This text will show once for each dependant worksheet in the file, including for dependants with a full return in the file.
{{/CurrentClient.Dependant}}

To pull information from the dependant worksheet:

{{#CurrentClient.Dependant}}{{FirstName}}, age {{AgeOnDec31}}{{/CurrentClient.Dependant}}

Result: Joe, age 7

count(File.Dependants) 

Count the number of full dependant returns in the file.

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

{{# count(File.Dependants) > 0}}Show this text if there are full dependant returns in the file.{{/count(File.Dependants) > 0}}

count(File.Dependant) 

Count the number of dependant worksheets in the current return, including those that have full returns.

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

{{#count(File.Dependants) > 0}}Show this text if there is at least one Dependant worksheet in the file.{{/count(File.Dependants) > 0}}

first(Dependant, Identification.AgeOnDec31 > 12)

Use the first() function to show text if there is at least one dependant that meets the criteria. For example, to check for at least one dependant under the age of 12.

{{#CurrentClient}}

{{# first(Dependant, Identification.AgeOnDec31 < 12) }}
This text should only show if at least one dependant is under the age 12 and does not repeat for each dependant that is under the age of 12.
{{/ first(Dependant, Identification.AgeOnDec31 < 12) }}

{{/CurrentClient}}