You are here:
How Null Values Work in Decision Tables
Use the Consider Null Values for Lookup option to handle the behavior of how rows with null values are treated during lookup. When you enable this option, rows with null values in the decision table are matched only when the input explicitly includes null, which ensures precise matches. When you disable this option, and any of the rows have null values, then the column values that pertain to the null value are also considered as null.
Required Editions
| Available in: Lightning Experience |
| Available in: Enterprise, Unlimited, and Developer Editions for clouds that have Business Rules Engine enabled |
| INPUT | OUTPUT | ||
|---|---|---|---|
| Product | Payment type | Price | Discount |
| A | one-time | 1000 | 5 |
| B | null | 500 | 10 |
| B | one-time | 500 | 15 |
| Product | Payment Type | Price | Output with Consider Null Values for Lookup Enabled | Output with Consider Null Values for Lookup Disabled |
|---|---|---|---|---|
| A | one-time | 1000 | 5 (first row is an exact match) | 5 (first row is an exact match) |
| B | null | 500 | 10 (second row matches explicit null in input) | 10 and 15 (second and third rows match the product and price columns, and null matches all values in the payment type column) |
| A | null | 1000 | No output values (first row's 'one-time' doesn't match explicit null) | 5 (first row matches the product and price and null matches all payment type values) |
| B | one-time | 500 | 15 (third row is an exact match) | 15 (third row is an exact match) |
Null Values vs. Empty Strings in CSV Decision Tables
When you create or edit a decision table by using a CSV file, Business Rules Engine distinguishes between empty cells and null values based on what the cell contains.
- An empty cell in a CSV file is interpreted as an empty string (
""), not as a null value. - To represent a null value in a CSV file, enter NULL in uppercase in the cell.
This distinction affects how the decision table matches input values at runtime, especially when you use the Consider Null Values for Lookup option.
Consider a decision table with these CSV rows for the Payment Type column.
| Product | Payment Type (cell value in CSV) | How Business Rules Engine Interprets the Value |
|---|---|---|
| A | one-time | Treated as the string one-time. |
| B | (empty cell) | Treated as an empty string (""). |
| C | NULL | Treated as a null value. |

