enfr

Data monitor expressions

Updated: 2017-01-23

Show field code in the data monitor

The field code for the currently-active field always shows in the blue bar at bottom left of the TaxCycle windows. (Click on this also copies it to your clipboard.)

If you prefer, you can add a data monitor to show the current field code. Right, click on a cell in the data monitor and select Show field code

Note that clicking on the data monitor cell when showing the current field code does nothing. It does not copy it to your clipboard and it does not take you to the related field.

The Expression field in the data monitor editor can contain more than just a single field code. You can use it to add two fields together, or evaluate a condition.

Edit a data monitor expression

  1. Right click on a data monitor cell and select Edit data monitor.
  2. In the dialog box that opens, you can do the following:
    1. Type in the Description field to change the words that appear next to the monitored data.
    2. Edit the expression field to create a calculation or to test an assumption. 
    3. In the Colour field, type the name of a colour to change the colour of the text that appears in the data monitor. If you don't enter a colour, the data monitor will use Green for positive numbers and Red for negative. You aren't limited to just a few colours, either. See the list of possible colours at the bottom of this help topic.
  3. Click OK to save your changes and update the data monitor.

Right-click to edit a data monitor

Expressions are similar to those in the Template Editor

You can use field codes to create calculations and conditions in much the same way as you do in the Template Editor, as long as you remove both the double braces {{ }} (curly brackets) and the CurrentClient. prefix.  

This includes formatting dates, creating conditions and using constants. Please review the Template Editor topics on Field codes and constants and Conditions for examples and to learn more about how to make these work.

For example, the following code shows the phone number for the currently-open return, correctly formatted:

Show the current taxpayer's phone number

Colours for the data monitor

The following colours work in the data monitor colour field and in expressions. This is a default list of generic C# colour names. Not all the text colours are easily visible agains the data monitor background colour. 

The table below shows colours against the same background colour as the data monitor cells. Use this to help you choose a colour that works so you can see the text on the grey background. 

AliceBlue DarkSlateGray LightSalmon PaleVioletRed
AntiqueWhite DarkTurquoise LightSeaGreen PapayaWhip
Aqua DarkViolet LightSkyBlue PeachPuff
Aquamarine DeepPink LightSlateGray Peru
Azure DeepSkyBlue LightSteelBlue Pink
Beige DimGray LightYellow DimGray
Bisque DodgerBlue Lime PowderBlue
Black Firebrick LimeGreen Purple
BlanchedAlmond FloralWhite Linen Red
Blue ForestGreen Magenta RosyBrown
BlueViolet Fuchsia Maroon RoyalBlue
Brown Gainsboro MediumAquamarine SaddleBrown
BurlyWood GhostWhite MediumBlue Salmon
CadetBlue Gold MediumOrchid SandyBrown
Chartreuse Goldenrod MediumPurple SeaGreen
Chocolate Gray MediumSeaGreen Seashell
Coral Green MediumSlateBlue Sienna
CornflowerBlue GreenYellow MediumSpringGreen Silver
Cornsilk Honeydew MediumTurquoise SkyBlue
Crimson HotPink MediumVioletRed SlateBlue
Cyan IndianRed MidnightBlue SlateGray
DarkBlue Indigo MintCream Snow
DarkCyan Ivory MistyRose SpringGreen
DarkGoldenrod Khaki Moccasin SteelBlue
DarkGray Lavender NavajoWhite Tan
DarkGreen LavenderBlush Navy Teal
DarkKhaki LawnGreen OldLace Thistle
DarkMagenta LemonChiffon Olive Tomato
DarkOliveGreen LightBlue OliveDrab Turquoise
DarkOrange LightCoral Orange Violet
DarkOrchid LightCyan OrangeRed Wheat
DarkRed LightGoldenrodYellow Orchid White
DarkSalmon LightGreen PaleGoldenrod WhiteSmoke
DarkSeaGreen LightGray PaleGreen Yellow
DarkSlateBlue LightPink PaleTurquoise YellowGreen

Add field codes to expressions

  1. Click in the first field you want to include in the expression and add it to a monitor.
  2. Click in the next field you need for the expression, hold down the Ctrl key  and click on the field code in the blue bar at the bottom left of the window. This will copy the code to your clipboard while removing the CurrentClient. prefix from the beginning of it (it is unnecessary for the data monitor fields).
    Click the hyperlink to put the field code onto your clipboard
  3. Next, right click on the monitor you just created and click Edit data monitor.
  4. In the Expression field, add an mathematical operator, like a plus or minus sign and then paste the field code in the right place.
  5. Next, remove double braces {{ }} (curly brackets) and you can use the field code however you wish.

Right click to copy a field code

  1. Right click on the field and select Copy field code to put the code on your clipboard without brackets. For example: CurrentClient.Engage.Preparer.ClientID
  2. Remove the CurrentClient. prefix and then use this in the Data Monitor

Preset expressions

The preset data monitors contain sample code that you can use to get started. To use one of these:

  1. Right-click on a data monitor select Edit data monitor.
  2. In the Preset drop-down, choose from the preset expression. The section below explain the expressions and behaviour in TaxCycle T1.

Select and view preset expressions

T1—Balance due (Refund) presets

Shows the refund or balance owing. Refund appears as a negative number in parentheses and in red text. Balance owing shows in green text.

Description Expression Colour

Balance due (Refund)

Always shows this text.

Filing.Balance

Shows the refund or balance owing for the current taxpayer.

Empty

Default behaviour of negative value in parentheses and red text. Positive in green text.

Combined Balance due (Refund)

Always shows this text.

Filing.CombinedBalance

Shows the refund or balance owing for the current taxpayer and spouse.

Empty

Default behaviour of negative value in parentheses and red text. Positive in green text.

Family Balance due (Refund)

Always shows this text.

Filing.FamilyBalance

Shows the refund or balance owing for the entire family: principal taxpayer, spouse and dependants.

Empty

Default behaviour of negative value in parentheses and red text. Positive in green text.

Spouse Balance due (Refund)

Always shows this text.

Filing.SpouseBalance

Shows the refund or balance owing for the spouse.

Empty

Default behaviour of negative value in parentheses and red text. Positive in green text.

TP1 Family Balance due (Refund)

Always shows this text.

Filing.TP1FamilyBalance

Shows the refund or balance owing for the TP1, for the entire family: principal taxpayer, spouse and dependants.

Empty

Default behaviour of negative value in parentheses and red text. Positive in green text.

T1—Balance due / Refund presets

Shows the refund or balance owing. The description changes depending on whether it is a refund or balance owing. Colour changes to red for balance due and green for refund. Never shows with parentheses for negative amounts.

Description Expression Colour

=cond(Filing.Balance>0,"Balance due", "Refund")

Condition tests whether the Filing.Balance (refund or balance owing for the current taxpayer) is greater or than zero. If so, show the text as Balance due. If not, show Refund.

abs(Filing.Balance)

Only shows the absolute value and never shows the parentheses for a negative number in the fieldFiling.Balance (refund or balance owing for the current taxpayer).

=cond(Filing.Balance>0,"Red", "Green")

Condition tests whether the Filing.Balance (refund or balance owing for the current taxpayer) is greater or than zero. If so, show the text in Red. If not, show in Green.

=cond(Filing.CombinedBalance>0,"Combined Balance due", "Combined Refund")

Condition tests whether the Filing.CombinedBalance (refund or balance owing for the current taxpayer and spouse) is greater or than zero. If so, show the text as Balance due. If not, show Refund.

abs(Filing.CombinedBalance)

Only shows the absolute value and never shows the parentheses for a negative number in the fieldFiling.CombinedBalance (refund or balance owing for the current taxpayer and spouse).

=cond(Filing.CombinedBalance>0,"Red", "Green")

Condition tests whether the Filing.CombinedBalance (refund or balance owing for the current taxpayer and spouse) is greater or than zero. If so, show the text in Red. If not, show in Green.

=cond(Filing.FamilyBalance>0,"Family Balance due", "Family Refund")

Condition tests whether the Filing.FamilyBalance (refund or balance owing for the entire family: principal taxpayer, spouse and dependants) is greater or than zero. If so, show the text as Balance due. If not, show Refund.

abs(Filing.FamilyBalance)

Only shows the absolute value and never shows the parentheses for a negative number in the fieldFiling.FamilyBalance (refund or balance owing for the entire family: principal taxpayer, spouse and dependants).

=cond(Filing.FamilyBalance>0,"Red", "Green")

Condition tests whether the Filing.FamilyBalance (refund or balance owing for the entire family: principal taxpayer, spouse and dependants) is greater or than zero. If so, show the text in Red. If not, show in Green.

=cond(Filing.SpouseBalance>0,"Spouse Balance due", "Spouse Refund")

Condition tests whether the Filing.SpouseBalance (refund or balance owing for the spouse is greater or than zero. If so, show the text as Balance due. If not, show Refund.

abs(Filing.SpouseBalance)

Only shows the absolute value and never shows the parentheses for a negative number in the fieldFiling.SpouseBalance (refund or balance owing for the spouse).

=cond(Filing.SpouseBalance>0,"Red", "Green")

Condition tests whether the Filing.FamilyBalance (refund or balance owing for the spouse) is greater or than zero. If so, show the text in Red. If not, show in Green.

T1—Refund (Balance due) presets

Shows the refund or balance owing. Refund appears as a positive number in green text. Balance owing shows as a negative number with parentheses and in red text.

Description Expression Colour

Refund (Balance due)

Always shows this text.

0-Filing.Balance

SubtractingFiling.Balance (refund or balance owing for the current taxpayer) from zero, changes the positive value to a negative value, and vice-versa.

Empty

Default behaviour of negative value in parentheses and red text. Positive in green text.

Combined Refund (Balance due)

Always shows this text.

0-(Filing.CombinedBalance)

SubtractingFiling.CombinedBalance (refund or balance owing for the current taxpayer and spouse) from zero, changes the positive value to a negative value, and vice-versa.

Empty

Default behaviour of negative value in parentheses and red text. Positive in green text.

Family Refund (Balance due)

Always shows this text.

0-Filing.FamilyBalance

SubtractingFiling.FamilyBalance (refund or balance owing for the entire family: principal taxpayer, spouse and dependants) from zero, changes the positive value to a negative value, and vice-versa.

Empty

Default behaviour of negative value in parentheses and red text. Positive in green text.

Spouse Refund (Balance due)

Always shows this text.

0-Filing.SpouseBalance

SubtractingFiling.FamilyBalance (refund or balance owing for spouse) from zero, changes the positive value to a negative value, and vice-versa.

Empty

Default behaviour of negative value in parentheses and red text. Positive in green text.

T1—Taxpayer age on Dec 31 preset

Shows the taxpayer age and changes the colour based on whether it is over or under 65 at the end of the year. Taxpayers over 65 at the end of the year show in red, Those under 65 show in green.

Description Expression Colour

Taxpayer age on Dec 31

Always shows this text.

Info.CommonData.AgeOnDec31

Shows the age on December 31st of the tax return year.

=cond(Info.CommonData.AgeOnDec31>=65,"Red","Green")

Condition tests whether the taxpayer's age is on December 31st of the tax return year is greater than or equal to >=65. If it is, show the age in red. If it isn't, so it in green.