Creating a Tree Rule
  • 19 Jul 2022
  • 1 Minute to read
  • Dark
    Light

Creating a Tree Rule

  • Dark
    Light

Article summary

Overview

A Tree Rule is a subtype of a Matrix Rule, with values evaluated on one axis instead of two. When compared to Matrix Rules or Truth Tables, Tree Rules are mainly used when conditions contain branching paths that lead to a single result.  

A Tree Rule can only add new Rule evaluations as nested columns, and results are displayed in the rightmost column. Below is an example of a Tree Rule.



Example

  1. In a Designer Project, Create a Matrix Rule.
  2. On the Properties panel under the SETTINGS category, click the drop-down list under Rule Type and select Tree [One Axis].


  3. Click SETUP INPUT DATA.
  4. Click DEFINE. Enter "EmployeeTeam" in the Name field. Click Save and close the Input Data window.

  5. Hover over Add Rule and click the plus sign.
  6.  Navigate to All Rules > Data > Text and select Is Empty Rule. Click ADD.
  7. On the Edit Rule window, select Unknown next to the Value field and select Select From Flow. Select EmployeeTeam and click DONE. Click CLOSE to close the Edit Rule window.

  8. Click the check box on the False row to change the value to False. 
  9. Hover over the False cell under the Is Empty column. and click the plus sign.
  10. Navigate to All Rules > Data > Text and select the String is in List Rule. Click ADD.
  11. Under the INPUTS category, select Unknown next to the Case Insensitive field and select Constant. Click on the check box that appears. Make the List field a Constant and enter “Accounting", "Marketing" and "IT.” Click Unknown next to the Value field and select Select From Flow. Select EmployeeTeam and click DONE.


Debug

  1. On the top action bar, click Debug. Enter "IT" for the Employee Team field and click START DEBUGGING. The outcome path and result will be highlighted within the debugger.



For further information on Rules, visit the Decisions Forum.

Was this article helpful?