Define Decision Table Input

An input (also referred to as input clause) to a decision table consists of an input expression and several input entries. It is represented as a column within a table. A decision table may have multiple inputs.

Specify Input Expressions

In a decision table, you enter an input expression in the header cell of an input column. In combination with input entries, an input expression determines the value of a particular input column. It can be a simple test expression, for example, Age>50. You can use input variables, outputs of other decisions, or built-in functions to define input expressions.

You can enter a built-in function in any cell of the decision table. For example, you can use built-in functions such as contains, starts with, and substring that can calculate or filter a specific value from the input values defined in the header cell of the input column. Built-in functions used in input conditions must evaluate to a boolean value.

In an Input Expression cell, press Ctrl+Space to open a drop-down menu. Use the options available in the menu to define your expression. You can also click on the Enter Allowed Values cell to enter or edit the input expression.

In the Decision Model editor, the expression language used for all expressions, including input expressions, is friendly enough expression language (FEEL). Want to learn more about the expression language syntax? See Define Expressions with the Friendly Enough Expression Language (FEEL).

Allowed Values

Click on the Enter Allowed Values cell within an Input Expression or Output Label cell to specify permitted values for cell entries of that column. However, for an input column, the type of allowed values (or specific allowed values) are automatically populated when you specify the input expression for the column. For example, if an input expression returns Boolean values, allowed values for that column are populated as true, false. The options you can choose from for changing the type of allowed values are listed in the following table. Note that after you specify the input expression for a column, the type of allowed values you can toggle between are limited.

Allowed Value Type Description

Auto

This is the default selection for a new input column.

Any

Use this option to specify that there are no restrictions on the data type of entries. Optionally, restrict entries to a given value or list of values.

This is the default selection for the output column.

Text

Use this option to restrict entries to text strings. Optionally, specify a particular string or list of strings.

Number

Use this option to restrict entries to numbers. Optionally, specify a particular number, limit, or range.

Date and Time

Use this option to restrict entries to date and time values. Optionally, specify a particular date and time value, limit, or range.

True or False

Use this option to permit only Boolean entries.

Other Type

Use this option to restrict entries to a given custom data type.

Advanced

Use this option to permit FEEL expressions and null values as entries. Optionally, specify constraints using FEEL expressions.

Note:

The data type of input entry cells is determined by the data type of the input expression. Make sure that the type of allowed values you supply is consistent with the data type of the input clause.

Specify Input Entries

You can enter strings, numbers, Boolean values, date and time values, or FEEL expressions as input entries based on the mode selected. If you've provided specific allowed values or if your input expression returns a finite set of values, an auto-suggest menu appears when you click on an input entry cell.

Note:

If the data type of an input entry does not match the data type of the column, or if the input entry is not among the allowed values, an error is displayed within the decision.

Modes

Based on the input expression and/or allowed values you specify, the mode for entry cells is automatically selected. If required, click on the Mode icons to switch to a different mode. The following figure shows the Mode Editor window with Text mode selected:



The mode options available to you in the editor is dependent on the data type of the input expression or allowed values you've specified. The following table details all the available modes:

Mode Description

Any

Use this mode to mark an entry as irrelevant (-).

Text

Use this mode to enter strings. In this mode, you can enter a string as a plain literal without double quotes.

Number

Use this mode to enter numbers. Optionally, use the constraint options available in the Mode editor.

True or False

Use this mode to enter Boolean values.

Date and Time

Use this mode to enter date and time values. Optionally, use the constraint options available in the Mode editor.

Advanced

Use this mode to enter advanced FEEL expressions and null values. You can use the constraint options available in the Mode editor to define an expression.

Want to learn more about the syntax and examples? See Grammar Rules.