Template Rules




Standard Rules

OrgChart Now comes with a list of built in rules (e.g conditional formats) that can be applied to your chart template.

Defining or Editing a Standard Rule

To edit a field, select an option from the drop down list. Reference the example below.

basic_overview.png

For example, the rule 'Title' equals 'Program Manager' or 'Cost Center equals 10' will highlight boxes that satisfy this condition.

In the example above, the system style 'Highlight-yellow' box style is selected. Clicking OK and APPLY would highlight all boxes with the title of 'Program Manager' or Cost Center of '10' in yellow.

  • For more information on applying different box styles, click here.
Basic Value Picker

The value picker button in the basic chart template rule editor allows you to insert values from your data on the fly.
To use the value picker:

  • Select a field from the drop-down list. When you select a field is selected that has associated values in the chart, the "Add Value" button will become active.
  • Click the "Add Value" button to see the list of available values associated with that field.
  • Select a value from the drop-down to insert it into the text area.
basic_value.png

Note: A valid chart must be open in order to use the value picker. The "Add Value" button will become active when a field definition is selected containing associated values.


Complex Rules

Along with built in template rules, OrgChart Now gives you the option to create your own 'complex rule.' This feature allows you to define custom rules for your org chart. A list of supported operator types can be found below for reference.

Defining or Editing a Complex Rule
To define a complex filter make sure the 'Complex Filter' checkbox is selected in the Filter Data Panel. Click on the 'Edit Rule…' button to define or modify a complex rule.

complex_overview.png



For example, entering in the textbox 'ToDate([HireDate]) <= ToDate([TODAYF])' would return True if the hire date is not in the future.

You can then select a box style to be applied to your org chart for this condition.


Note: The message: "Rule Valid." will be display when you haven't made an errors in a complex rule definition declaration.


Complex Value Picker

The value picker button in the basic chart template rule editor allows you to insert values from your data on the fly.
To use the value picker:

  • Click "Show Fields" and select a field definition from the drop-down list to insert the string into the text area.
  • Highlight the field definition string. If the field definition has values associated with it, the "Show Values" button will become active.
  • Click "Show Values" and select a a value from the drop-down list to insert it into the text area.
complex_values.png

Note: A valid chart must be open in order to use the value picker. The "Show Values" button will become active when a highlighted field definition contains associated values.


Operator Types



Comparison Operators

The following Comparison Operators are available:

Operator Description Example
== equal to [Department] == "Strategy"
!= not equal to [Department] != "Strategy"
> greater than [Salary] > 100000
< less than [Salary] < 100000
>= greater than or equal to [Salary] >= 100000
<= less than or equal to [Salary] <= 100000

Logical Operators

The following Logical Operators are available:

Operator Description Example
&& and [Department] != "Strategy" && [Department] != "Planning"
|| or [Department] == "Strategy" || [Department] == "Planning"
! not !(StartsWith([CostCenter],"999")

String Functions

The following String Functions are available:

Operator Description Example
ToUpper() Convert string to upper case ToUpper([Department])
ToLower() Convert string to lower case ToLower([Department])
Contains() Test if a string contains a string Contains([Department], "001")
StartsWith() Test if a string starts with a string StartsWith([Department], "001")
EndsWith() Test if a string ends with a string EndsWith([Department], "001")

Date Functions

The following Data Functions are available:

Operator Description Example
ToDate() Converts string to date ToDate("12/1/2017")
TODAY Today's date ToDate([TODAY])
TODAYF Today's date including time ToDate([TODAYF])
TODAYF+N Today's date + N days ToDate([TODAYF+5])
TODAYF-N Today's date - N days ToDate([TODAYF-5])

NOTE: TODAY should be used to test if a date is equal to today. Example: ToDate([HireDate]) == ToDate([TODAY]). TODAYF should be used for all other comparisons.

Examples

Some examples listed below:

Example Notes
[Department] != "Strategy" && ([Department] != "Planning" || [CostCenter] == "999") [Department] != "Strategy" AND ([Department] != "Planning" OR [CostCenter] == "999")
ToDate([HireDate]) <= ToDate([TODAYF]) True if "HireDate" is not in the future
EndsWith(ToUpper([CostCenter]),"SE9") True if cost center ends with "SE9" or "se9" or "Se9" or "sE9"