Menu

Break Apart a Field Code

Updated: 2025-03-17

Field codes provide structure to the data within a tax return. To make your code more concise and readable, break it down into smaller parts. 

The following field code refers to First name field on the Info worksheet in TaxCycle T1. This is exactly how it would look if you copied it from the field:

{{CurrentClient.Info.ID.FirstName}}

CurrentClient This part instructs the Template Editor to extract data from the client that is visible or currently active. For example, when you view the client letter for the principal taxpayer, it references their first name; however, when you view the client letter in the spouse’s return, it references their first name. If you view the letter for the principal taxpayer and you want to include the spouse’s first name, use CurrentSpouse instead. See Clients and Taxpayers
Info This references the Info worksheet.
ID This references the ID section on the Info worksheet.
FirstName This references the name field for the client’s first name, on the Info worksheet, under the ID section.

You can use these components to streamline your code. For example, the following two segments both insert the taxpayer’s address. By separating out common segments of this group of field codes into a condition, you can achieve the same result with much more readable code.

Original Broken Down

{{ CurrentClient.Info.ID.FirstName }} {{ CurrentClient.Info.ID.LastName }}

{{# CurrentClient.Info.ID }}
{{ FirstName }} {{ LastName }}
{{/ CurrentClient.Info.ID }}

We use this construction this quite often in the built-in templates. It also facilitates more complex actions, like creating repeatable sections