Menu

Custom Fields in Templates

Updated: 2024-03-01

You can add custom fields to TaxCycle returns to collect data to use in templates and the data monitors. For complete instructions on creating these fields, read the Custom Fields help topic.

You can reference the Unique ID in template code to reference the data in the custom field.

Show the Value in the Field

  1. Open the client context by using the {{#CurrentClient}} {{/CurrentClient}} tags.
  2. In between these tags, use the customfield function and insert the Unique ID between the quotation marks. For example: {{customfield("Newsletter")}}
Code

{{#CurrentClient}}

{{customfield("Newsletter")}}

{{/CurrentClient}}

Test for a Value in a Text Field

To check whether a text field contains a specific value, use the custom field in a conditional statement.

Example

{{#CurrentClient}}

{{#customfield("ReferredBy")="John Smith"}}

This text will display if the contents of the ReferredBy field exactly match John Smith.

{{/customfield("ReferredBy")="John"}}

{{/CurrentClient}}

Test a Yes/No Field

Use the following code to show or hide content based on the selection in a Yes/No field.

Example 1 Example 2

{{#CurrentClient}}

{{#isyes(customfield("Newsletter"))}}

Show this text if the answer is Yes in the custom field.

{{/isyes(customfield("Newsletter"))}}

{{/CurrentClient}}

{{#CurrentClient}}

{{#isno(customfield("Newsletter"))}}

Show this text if the answer is No in the custom field.

{{/isno(customfield("Newsletter"))}}

{{/CurrentClient}}

Check for an Amount in a Money Field

Use the following code to show or hide content based on the selection in a Money field.

Example 1 Example 2

{{#CurrentClient}}

{{# not(isblank(customfield("Amt"))) }}

There is an amount outstanding of ${{ format(customfield("Amt"), "C0") }}.

{{/ not(isblank(customfield("Amt"))) }}

{{/CurrentClient}}

{{#CurrentClient}}

{{# isblank(customfield("Amt")) }}

There is no amount in the field.

{{/ isblank(customfield("Amt")) }}

{{/CurrentClient}}

Use Custom Fields in Template Conditions

You can use a custom field to determine whether a template is used or relevant. For example

  1. Create a Yes/No field on the CustomFields worksheet. In this example, the unique id is ClientInvoice.
  2. In template properties, create a condition like the following: customfield("ClientInvoice")="Yes"
  3. In this example, if the custom field ClientInvoice is answered Yes, the template is considered used. If a template is considered used, then you can include it automatically in a print set.

2019-customfields-template-condition