Menu

Sample Code: Tuition Transfer from a Dependant

Updated: 2020-05-15

One complexity is if you need to pull information from the principal taxpayer and spouse's return and also from a specific dependant's return. Sometimes, you can use the dependant worksheet, but sometimes, you need to make a more complex query.

Sample code

The following code works to create a statement in a dependant's return. It is interesting because it first tests for a tuition transfer by looking in the dependant's return, then looks at the Dependant worksheet in the principal taxpayer's and spouse's returns to determine the relationship.

Code

I designate {{! Transfer Recipient Details }}{{< names}}{{#S1.FederalNRTC.M[36]}}{{Info.ID.FirstName}} {{Info.ID.LastName}}, my{{#Dependant}}{{#UniqueId = CurrentClient.UniqueId}}{{#Identification.Relationship="Grandchild"}} grandparent{{/end}}{{#(Identification.Relationship="Daughter") or (Identification.Relationship="Son") or (Identification.Relationship="Child")}} parent{{/end}}{{/end}}{{/Dependant}}{{/S1.FederalNRTC.M[36]}}{{/ names}}{{# File.Principal }}{{> names}}{{/ File.Principal }}{{# File.Partner }}{{> names}}{{/ File.Partner }}, to claim ${{CurrentClient.S11.TransferCarryforwardAmount.M[8]}} on line 324 of his/her federal Schedule 1, or on line 360 of his/her federal Schedule 2, as applicable

Output I designate Madison Jones, my parent, to claim $5000 on line 324 of his/her federal Schedule 1, or on line 360 of his/her federal Schedule 2, as applicable.

Breakdown

Code Description

{{! Transfer Recipient Details }}{{< names}}

...

{{/ names}}

Create a repeatable section using the code within these tags. To learn more, see the Repeatable Sections help topic.
{{# File.Principal }}{{> names }}{{/ File.Principal }}{{# File.Partner }}{{> names }}{{/ File.Partner }} Repeat this section for the principal taxpayer and spouse/partner in the file. To learn more, see the Repeatable Sections help topic.

{{#S1.FederalNRTC.M[36]}}

...

{{/S1.FederalNRTC.M[36]}}

Tests to see whether there is an amount transferred from the dependant to the principal taxpayer or spouse. If there is, the text and code within these tags will apply. If not, it will be ignored.

​{{Info.ID.FirstName}} {{Info.ID.LastName}}

Inserts the name or either the principal taxpayer or spouse/partner receiving the tuition transfer.

{{#Dependant}}{{#UniqueId = CurrentClient.UniqueId}}

...

{{/end}}{{/Dependant}}

Checks to see whether the dependant in the file of the principal taxpayer or spouse/partner receiving the tuition transfer is the same as the CurrentClient.

{{#Identification.Relationship="Grandchild"}} grandparent{{/end}} Show the word grandparent, if the relationship listed on the Dependant worksheet is Grandchild. (Because the relationship is only specified on the Dependant worksheet in the principal taxpayer/spouse's returns.)

{{#(Identification.Relationship="Daughter") or (Identification.Relationship="Son") or (Identification.Relationship="Child")}} parent{{/end}}

Show the word parent, if the relationship listed on the Dependant worksheet is Son, Daughter or Child.(Because the relationship is only specified on the Dependant worksheet in the principal taxpayer/spouse's returns.)