Editing Decision Tables
The decision table editor is a grid of When columns (inputs), Then columns (outputs) and rules. You need permission to update decision tables to save edits.
The editor has four tabs: Rules, Versions, Releases and Metrics. Editing happens on Rules, which is the default tab and the one that opens when you switch tables. A dot on the Rules tab marks unsaved edits. See Publishing and releasing for the other tabs. The header toolbar below is available on Rules only.
Header toolbar
The toolbar has these controls, in order.
| Control | What it does |
|---|---|
| Name, version and status tags | Shows "Version N", the status (Draft, Pending Approval, Published, Rejected or Discarded), "Live in Development: Version N" when a version is live there, and "Next: Version N at time" when one is scheduled. |
| Undo / Redo | Steps back or forward through edits. Keys: Ctrl/Cmd+Z and Ctrl/Cmd+Y. Both are disabled when there is nothing to undo or redo. |
| Cancel | Reloads the loaded version and discards your edits, including a changed name. There is no confirmation. |
| Save | Saves the table. See below. |
| Guide | Opens the authoring guide drawer. |
| Validate | Checks the table. See Validating decision tables. |
| Test | Opens the Test tab in the dock. See Testing decision tables. |
Save is highlighted only when you have unsaved edits. It is disabled when you lack permission to update decision tables (tooltip "You don't have the access to update decision table"), there are no edits, the name is empty or a duplicate, or the table is loading or failed to load.
Save first runs local checks. Errors block the save and appear as toasts, one per message. Warnings also appear as toasts. On success the toast reads "Saved successfully!". If the table did not load, it reads "The decision table is not loaded, so it cannot be saved. Reload it and try again."
Test stays available with unsaved edits. It opens with a hint to save first, and tests run the saved version. To switch versions, select Open on a row in the Versions tab. To publish, use Versions too. Publish is disabled until your edits are saved.
More actions
On narrow windows, controls move into the More actions menu.
| Window width | Moves into the menu |
|---|---|
| Below 1100px | Guide, Validate, Cancel |
| Below 560px | Test (shown as "Test (save first)") |
Undo, Redo and Save always stay in the toolbar.
Leave with unsaved edits
If you close the tab or press the browser back button with unsaved edits, Studio prompts you first.
Set the hit policy
The hit policy decides what happens when several rules match.
- In the Hit Policy column group, open the hit policy dropdown.
- Select a policy.
Select the help button (What is a hit policy?) to see a tooltip that lists all nine policies.
| Policy | Hint in the dropdown |
|---|---|
| Any | Matching rules must agree |
| Unique | Only one rule may match |
| First | The first matching rule wins |
| Collect | Every match is returned |
| Collect (Sum) | Matches are added up |
| Collect (Min) | The smallest match is returned |
| Collect (Max) | The largest match is returned |
| Collect (Count) | Matches are counted |
| Rule order | Every match is returned, in rule order |
Collect (Sum), Collect (Min), Collect (Max) and Collect (Count) are disabled when the Then columns do not fit. The option is labeled "(Requires one output)" or "(Requires one numeric output)".
Work with columns
Add a column
- Select + on the When or Then group header (Add When column or Add Then column).
- Edit the column in the popover that opens.
A new column is named Input_N or Output_N and has the type String.
Edit a column
Select the column name to open the popover Edit column NAME.
| Field | Notes |
|---|---|
| Column name | Placeholder "Column name (for example, startDate)". |
| Column Type | String, Boolean, Number, Integer, Date, Time or Date Time. |
| Default Value | Optional. |
| Label / description | Optional text. |
Select Submit to apply, or Cancel.
Input (When) names must start with a letter or underscore, then contain letters, digits or underscores. Otherwise Studio shows "Input names must start with a letter or underscore and contain letters, numbers or underscores." A FEEL keyword is rejected: "Choose an input name that is not a FEEL keyword." Column names must be unique.
If a type change does not fit the existing values, Studio asks Change the column type? with the text "This clears the column's values in every rule." Select Change Type to confirm or Keep Type to cancel.
Column header controls
Icons appear when you hover over or focus a header. They are hidden when the table is read-only.
| Control | What it does |
|---|---|
| Info icon (Details for NAME) | Tooltip with Name, Type, Default Value and Description. A blank value shows "N/A". |
| Pin column / Unpin column | Pinned columns move to the left. |
| More options > Edit Column | Opens the column popover. |
| More options > Duplicate Column | Copies the column and its values. The name gets an _N suffix. The copy is not pinned. |
| More options > Remove Column | Removes the column. |
A table needs at least one input and one output column. Removing the last one shows "There should be at least one Input column" (or "Output column").
Drag column headers to reorder them.
Work with rules
| Control | What it does |
|---|---|
| Add Rule | Adds a rule at the bottom. Disabled when read-only. |
| Enable rule N switch | When off, the rule is greyed out, skipped when the table runs and excluded from the Unique and Any checks. |
| Drag handle | Drag to reorder rules. |
| More options for rule N > Duplicate | Inserts a copy below. |
| More options for rule N > Clear Rule | Clears the cell values. The rule is switched back on. |
| More options for rule N > Delete Rule | Deletes the rule. There is no confirmation. |
The footer counter reads "N rules" or "1 rule", plus ", N off" when rules are switched off.
Edit cells
Input cells have an operator select (Select type). Its options depend on the column type.
| Column type | Options |
|---|---|
| Number, Integer | Any, isEqual, Does not equal, Greater than, Less than, >=, <=, Between |
| Date, Time | Any, Before, After, Between |
| Date Time | Any, Before, After |
| Boolean | A True/False select |
| String | A text field (placeholder "Enter string value") |
Before and After are strict. After excludes the date itself. Date values accept YYYY-MM-DD or YYYY/MM/DD.
To write an expression:
- Select the pencil button in the cell. The Edit COLUMN popover opens.
- Turn on the FEEL Expression switch.
- Enter the expression in Set Value.
The switch tooltip reads: FEEL mode applies to every alternative in this cell. Use complete expressions, for example contains(?, "gold"), and quote literal text.
The editor autocompletes functions and shows parameter hints and inline syntax issues. For syntax, see the expression reference.
Annotations and rule details
The Annotations column group holds a note for each rule. Enter text in the Enter annotation field.
Select the info button (Rule N details) to open Rule details. It shows:
- The title "Rule N of M".
- An Off tag with "Skipped when the table runs." for a disabled rule.
- The conditions under If (or If all of these) and the results under Then. A rule with no conditions shows "Always applies."
- Previous rule, Next rule and Close rule details buttons.
Press Esc to close it. Focus returns to the cell. When no rule is focused, a hint reads "Click any cell to read its rule here."
Find in rules
Enter text in Find in rules below the grid. Matching rows and cells are highlighted and other rows dim.
| Key | Action |
|---|---|
| Enter | Next match |
| Shift+Enter | Previous match |
| Esc | Clear the search |
The status text reads "No matches", "N matches" or "k of N, Rule r, Column".
Read-only states and banners
The editor is read-only while loading and when the version is Pending Approval, Rejected or Discarded. Published versions are not locked.
| Banner | When |
|---|---|
| This table is currently under review. Withdraw it in Versions to edit it. Includes Go to Versions. | Pending Approval |
| This draft was discarded. It is kept for history, cannot be edited and never runs. | Discarded |
| Rejected by reviewer: comment. Includes Go to Versions, where you select Edit and resubmit. | Rejected |
| Function suggestions are unavailable. You can continue editing and validate the decision before saving. | Suggestions failed to load. Select Reload suggestions. |
| The decision table could not be loaded. … Editing is disabled so the stored table is not overwritten. | Load error. Select Retry. |
If the table is missing, Studio shows "This decision table was not found in the current workspace. It may have been deleted or renamed."
Dialogs when you save
Draft Version Already Exists
This opens when you save edits to a version that is not the draft, and a draft already exists: "A draft version (vN) already exists. Choose how to proceed:"
| Option | Result |
|---|---|
| Cancel | Closes the dialog. Nothing is saved. |
| Discard draft and save as new | Discards the existing draft (kept in history as Discarded) and saves your edits as a new draft. |
| Overwrite draft | Replaces the existing draft with your edits. |
If the first step works but the save fails, Studio keeps your edits in the editor. The message reads "Draft vN was discarded, but your edits could not be saved as a new draft. They are still in the editor; save again to create the draft."
Decision table changed by someone else
This opens when the version changed after you opened it. Your edits were not saved.
| Option | Result |
|---|---|
| Keep my edits | Keeps your edits in the editor. |
| Reload latest | Loads the latest version and discards your unsaved edits. |