Menu

Data Monitor Expressions

Updated: 2020-09-29

Edit a Data Monitor Expression

  1. Right click on a data monitor cell and select Edit data monitor.
  2. Select Expression as the Monitor type.
  3. In the Description field, type the English name that will appear next to the monitored data when you run TaxCycle in English.
  4. Add a French Description to use when you run TaxCycle in French.
  5. Edit the Expression field to create a calculation or to test an assumption.
  6. 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 Colours section below for a list of possible colours.
  7. Click OK to save your changes and update the data monitor.

Screen Capture: Edit a Data Monitor Expression

Creating Expressions and Conditions

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. Use the following tip for getting the field code you need:

  1. Click in the next field you need for the expression.
  2. Hold down the Ctrl key and click on the field code in the blue bar at the bottom left of the window.
  3. This copies the code to the clipboard and omits the CurrentClient. prefix from the beginning.

Please review the Template Editor topics on Field codes and Conditions for examples on creating complex expressions.

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 and select Edit data monitor.
  2. Click the Preset drop-down and select a preset to see the expressions.

Screen Capture: T1 Data Monitor Presets

Spouse and Family Presets

Any preset data monitors without "Spouse" or "Family" in the name display just the current taxpayer's value. Those with "Spouse" in the name include the amounts from the spouse's return. Those with "Family" include amounts from the taxpayer, spouse and any dependants that have full returns in the file.

Balance Due (Refund) Presets

The preset data monitors with "Balance due (Refund)" in their name:

  • Always show a description with "Balance due (Refund)" in the text.
  • Display balance owing as a negative amount in parentheses.
  • Show in red for balance due (negative number) and in green for refund (positive number). This is the default behaviour for positive and negative numbers when the data monitor colour field is blank.
  • Include the relevant amount from TP1 Québec returns in the calculated value when applicable.

Balance Due / Refund Presets

The preset data monitors with "Balance due / Refund" in their name:

  • Show a description with "Refund" in the name when there is a refund on the return and "Balance due" when an amount is owing on the return. This is accomplished using a condition to display the appropriate text. For example: =cond(Filing.Balance>0,"Balance due", "Refund")
  • Does not display negative amounts in parentheses. This is accomplished by using the absolute function abs() around the field code. For example: abs(Filing.Balance)
  • Show in red for balance due and in green for refund, using a condition test whether the filing balance is greater than zero and then show the correct color. For example: cond(Filing.Balance>0,"Red", "Green")
  • Include the relevant amount from TP1 Québec returns in the calculated value when applicable.

(Refund) Balance Due Presets

The preset data monitors with "(Refund) Balance due" in their name:

  • Always show a description with "(Refund) Balance due" in the text.
  • Display refund as a negative amount in parentheses. This is accomplished by subtracting the filing balance from zero. For example: 0-Filing.Balance
  • Show in red for refund (negative number) and in green for balance owing (positive number). This is the default behaviour for positive and negative numbers when the data monitor colour field is blank.
  • Include the relevant amount from TP1 Québec returns in the calculated value when applicable.

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.

Slips Presets

Slips modules (T4/T4A, T5 and T5018, etc.) include presets to display the count of the original (O), amended (A) and cancelled (C) slips. This is accomplished by using the slipcounts() function. For example, in T4 returns: slipcounts(T4Slips.T4, "T4")

Colours

The default behaviour in data monitor is to show negative values in parentheses with red text and positive values is green text. If you want to change the colors of the text, you can create a custom condition to show different colours.

  1. Choose a colour from the table below and type the name in the Colour field when editing a data monitor expression.
  2. To change the colour based on the data in the field, create a condition for the Colour field. For example
    =cond(Filing.Balance>0,"Blue", "Magenta") will show the monitor in Blue when the condition of Filing.Balance>0 is met, and Magenta when it is not.

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

Haven't found the answer? We can help.

Contact us and we’ll get back to you as soon as possible.