Views:

Overview

This article will detail how to set up Complex OR Conditions in North52 Decision Tables.  

OR Conditions allow you to keep your Business Logic on the same line instead of creating multiple rows producing the same result.

Basic Condition

When you add a condition to your Decision Table it is by default an AND type Condition

This means that it must be true for your row to execute its action.

In the below example: the Student Level must be Undergraduate AND the result of DistanceCalc must be less than 6for the row to be evaluated as true and execute its action.

Basic OR Condition

OR conditions must be set side by side in a Decision Table. To use OR conditions you highlight the columns you want to set together as OR conditions and right click on the Decision Table. This will bring up the Context Menu. From this you can click on Toggle Column OR to set the columns as OR Conditions. You can see step by step instructions here.

Below is an example of a basic OR Condition.

Here the Student Level must be Undergraduate AND the result of DistanceCalc must be less than 6 and they must be a Senior Student 

OR 

the Student Level must be Undergraduate AND the result of DistanceCalc must be less than 6 and they must be Living in their Parents Home.

This could also be represented in the Decision Table as the below:

Compound OR Conditions

Compound OR conditions are used for more complex logic. For example where the OR Condition contains internal AND conditions. 

To change columns to Compound OR's, highlight the columns and right click to bring up the context menu. Click Toggle Column OR and the columns will change to Condition-OR. Bring up the Context Menu again and click Toggle Column OR again and the columns will become Condition-Compound-OR columns.

To group Condition-Compound-OR columns together; edit the Row 1 cells and add numbers to them manually. In the below example Columns A and B are part of the same Condition-Compound-OR statement because their Row 1 cell's are Condition-Compound-OR-1.

Below is an example of a Condition-Compound-OR. Here you must be a Senior Student AND living at home, OR a postgraduate AND living within 6 miles.

This could also be written in a Decision Table as: