- 16 Jun 2022
- 2 Minutes to read
About Truth Tables
- Updated on 16 Jun 2022
- 2 Minutes to read
A Truth Table is a type of Rule that compares user data to multiple combinations of input data used in conditions to output the correct outcome or result. Each Row is configured with multiple statement Rules based on the input data used in the Truth Table. These Statement Rules then lead to an outcome set. If there are multiple rows returned in a Truth Table, there will be different combinations that the logic will evaluate while comparing the user input data.
The columns represent the input/output data in each row. For example, a Truth Table with Name and Email as input data would have one column for the Name statement Rule and another for the Email, then an outcome column for that row.
In the screenshot below, the Make, Model, and Year are the input data for the Rule with conditions configured for each row. The user input data is compared against each row to look for a row where the data matches the criteria which will then output the corresponding data.
Output Behavior Types
Truth Tables can be used for a wide assortment of use cases. Truth Tables are best used for cases that involve Rules that utilize nested "if" statements. One such implementation may involve the validation of data such as evaluating when to approve a car rental for a company by looking at when the car is being rented, the cost to the company, and the position of the person requesting the rental. So if the request is made by Person X, and if it is rented for X amount of days, and costs the company X amount of dollars, then the request will be approved.
Due to their ability to be created using either internally or externally sourced data, they can be helpful for tracking data pertaining to a System and/or that System's Accounts such as Account permissions. This can be accomplished by evaluating specific permission as an Input and comparing it against Accounts within a system that have those permissions as the Output. This may be Input statically through the Rule Designer or dynamically by creating a Truth Table externally via a Report.