DECISION Block

 

What is a Decision Table block?

The Decision Table block is what the App Builder can use to manipulate end user data with conditions (or rules) and model complex logic to create conditional output variables without the use of IF functions. An example use case for the Decision Table block includes risk scoring.

 

Do you have to use the IF function?

No. Unlike the COMP Table block, IF functions are not necessary to create complex logic in the Decision Table block. Instead, you will select the appropriate end user inputs (i.e. variables), operators and values using drop-downs and editable fields available to formulate the conditions to produce an outcome.

 

How to configure a Decision Table block

The Decision Table block is all about gathering inputs to formulate a condition to produce a single output. For example, by taking a risk scoring use case, we can allocate risk scores or grades (i.e. output - e.g. low, medium and high risk) based on the end user inputs such as contract value.

Adding Inputs and Configuring Rules

The following steps assumed you have dragged in a Decision Table block into your App Studio (of an editable Solution version) and have opened it for configuration.

  1. Under the "Inputs" header, use the available dropdown to select a variable to use as an input you wish to include to produce an outcome

    Note: Variables that will be shown in this dropdown include only the variables that are position before the Decision Table block. i.e. The Decision Table block should always be placed after all the relevant variables that will be used as inputs

  2. After you have selected a variable, you will notice that drop-downs and/or editable text fields will appear based on the type of variable you have selected. Use these corresponding fields to create rules (or conditions)

    E.g. You might create a condition with a number variable called "Contract_Value" as the input where the end user input must be greater than $100,000 to produce a certain output such as "High Risk". (How to add and configure outputs will be discussed in the next set of instructions below)

    Note: Refer to the operator options table below to see the operators each variable type will have

  3. If multiple inputs are required to produce a single outcome, you can click onto the three dotted icon next to the input variable column and select "Add Input". Then repeat steps 1-2 for each input you wish to add

  4. To remove an input, you can click onto the three dotted icon next to the input variable column you wish to remove and select "Remove Input"

Limitations:

  • You can only have up to 10 inputs in a single Decision Table block. If more inputs are required, it is recommended to use a COMP Table block
  • Each input condition in their respective Rule (i.e. row) has the AND relationship. If the OR relationship is required, please use the COMP Table block.

 

Copying Rules

Each row under the "Inputs" column is considered a "Rule" as they provide the condition to produce the corresponding output. If multiple outputs are required to be produced and the Rules are similar, it is best to save time by copying the Rules. To do this:

  1. Under the "Order" header, click onto the three dotted icon next to the numbering and select "Copy Rule"

Limitation: You can only have up to 20 Rules (i.e. rows) in a single Decision Table block. If more inputs are required, it is recommended to add or duplicate another separate Decision Table block

 

Re-ordering Rules

Each Rule is executed consecutively starting from the first row (i.e the first Rule). Therefore, the order in which you have the Rules can be important. It is best practice to have the complex Rules come first before the more simple Rules. To re-order your Rules:

1. Under the "Order" header, click onto the three dotted icon next to the numbering and select either "Move Up" or "Move Down"

 

Adding and Renaming Outputs

Note: Each output is treated as a variable in which you can treat like any other variable Text or Number variable. Output variables must be either Text or Number variables.

The following steps assumed you have dragged in a Decision Table block into your App Studio (of an editable Solution version) and have opened it for configuration.

  1. Under the "Outputs" header, select the variable type you wish to have for the output value and then add the value

    E.g. For the risk scoring use case, if the contract value is greater than $100,000, I might want to produce the text variable output of "High Risk"

    Note: The output variables must be either Text or Number variables

  2. If multiple outputs are required to be produced, you can click onto the three dotted icon next to the output variable column and select "Add Output". Then repeat steps 1-2 for each output you wish to add

  3. To remove an output, you can click onto the three dotted icon next to the output variable column you wish to remove and select "Remove Output"

Limitation: You can only have up to 10 outputs in a single Decision Table block. If more outputs are required, it is recommended to add or duplicate another separate Decision Table block or use the COMP Table block

 

Operator options for each input variable

By design, App Authors can add up to 10 input variables in a single Decision Table block.

 

Operators

Variable Type

Text

Number

Dropdown,

Radio Button,

Checkbox

Date

Any

No

Yes

No

Yes

Between

No

Yes

No

Yes

Equal To

No

Yes

No

Yes

Not Equal To

No

Yes

No

No

Less Than

No

Yes

No

No

Greater Than

No

Yes

No

No

Contains

Yes

No

Yes

No

Exactly Contains

Yes

No

Yes

No

Not Contains

Yes

No

Yes

No

Not Exactly Contains

Yes

No

Yes

No

Before

No

No

No

Yes

After

No

No

No

Yes