Creating a Truth Table
- 14 Nov 2022
- 1 Minute to read
- Print
- DarkLight
Creating a Truth Table
- Updated on 14 Nov 2022
- 1 Minute to read
- Print
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback
Overview
Truth Tables are a type of Rule that compares input data against multiple combinations sets of conditions that return a specific result.
In a Truth Table, conditions are divided into Columns, with specific combinations of these conditions forming Rows. Comparison values for conditions are defined as a Cell.
Note:
The Truth Table evaluates the output based on AND condition across the column within the same row.
Example
- In a Designer Project, Select CREATE RULE
- In the Gallery, select Truth Table from either the Favorites or Truth Table sections. Name the Truth Table, then hit CREATE.
- The Truth Table Designer automatically opens.
- Select SETUP INPUT DATA, then under Define Input Data, click DEFINE.
- A window will open, and enter variables that the Truth Table will use. Click Save once finished.
- Click Select Data Element for a column. A menu will appear listing configured input values. Select an input value, then CLOSE.
- Another menu will appear, defining the condition verb for the column. These conditions will vary depending on the data type of the input. Select a condition, then click on Close.
- The cells for the column will be updated to reflect the datatype of the input data. Select the pencil icon to define a comparison value for a cell in the column. Then CLOSE.
- Repeat the process for the remaining row. Additional rows and columns can be added using Truth Table Actions.
- Edit the output data for the Truth Table, if needed.
- Select Debug in the Global Action Bar to begin debugging the Truth Table.
- A window will open, allowing test values to be inputted.
- Once values are inputted, click START DEBUGGING. The Truth Table will then evaluate the conditions for every cell in the Truth Table; if an entire Row evaluates as True, then the result data will be outputted.
Optimizing Truth Tables
When using Converter Flows with Truth Tables, it is recommended to enable Outcome Caching for these Flows to improve performance, as this can drastically improve the Table's execution time.
For further information on Rules, visit the Decisions Forum.
Was this article helpful?