---
title: "Example: Decision Tables Using Collections and Variables in the Inputs"
slug: "example-decision-tables-using-collections-and-variables-in-the-inputs"
updated: 2026-06-03T17:58:02Z
published: 2026-06-03T17:58:02Z
canonical: "documentation.decisions.com/example-decision-tables-using-collections-and-variables-in-the-inputs"
stale: true
---

> ## Documentation Index
> Fetch the complete documentation index at: https://documentation.decisions.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Example: Decision Tables Using Collections and Variables in the Inputs

Decision Tables using Collections and Variables in the Inputs

## Overview

> **Intended audience:** Process designers, Web designers
> 
> **Tags:** Decision Table; Request Variables; Magic Variables; Collections; Mustache Syntax

This example shows Decision Table Inputs calling [Collections](/v1/docs/collections) through [mustache syntax](https://mustache.github.io/mustache.5.html). And you can call specific rows and fields delimited by dots.

This example also shows Decision Table Inputs calling [Request variables](/v1/docs/environment-variable-and-magic-variable-syntax-usage-sdk-and-script-examples) and [Magic variables](/v1/docs/magic-variables) through mustache syntax.

This example compares a loan ratio, which is stored in a Request variable with credit scores, that are stored in a Collection. Then, this Decision Table rates a loan ratio and credit scores to see if lenders are creditworthy for a loan.

Follow these steps to add a Decision Table:

1. To use the Decision Table with a variable, [create an Environment Variable](/v1/docs/create-a-new-environment-variable) called `loanRatio` that works on a [Screen](/v1/docs/screens) to enter data.
2. [Import the Collection](/v1/docs/export-and-import-a-collection#import-a-collection) **fico_scores.json**, which is at the end of this example. It has data about credit scores, which is on the page [MyFico](https://www.myfico.com/credit-education/credit-scores).
3. [Import the Decision Table](/v1/docs/import-and-export-a-decision-table) **Decision Table v4.json**, which is at the end of this example. The editor displays the imported Decision Table.

![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/ed2665a4-0132-454f-bd84-eb0c138708d8.png)A Decision Table example in the Decision Table Editor

It displays the following:

  - The input **Borrower Credit Score**, which conditions the number **score** from the Collection **FICO Score** that has been previously imported. The Collection is called using mustache syntax, calls the row number, and the Collection field **score.**
  - The input **Front-End Ratio** conditions the variable `loanRatio` by entering mustache syntax and selecting the variable.
  - According how the Inputs rate, the **Borrower Rating** output displays features for lenders and its creditworthiness.
4. [Test your Decision Table](/v1/docs/test-a-decision-table) to see data outputs.

  1. On the left side of the Decision Table, Click **Sample Input**. The JSON data model for the Decision Table displays.

![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/a93eca31-e7e0-4624-a035-e04d2b0acbcc.png)
  2. Add the `loanRatio` object in the JSON model.
  3. Enter values as follows:

```plaintext
{
   "creditScore": 800,
   "ratio": 0.20,
   "loanRatio": 0.31
}
```
  4. Click **Run**.
  5. If the Decision Table evaluates successfully, its output displays in the **Output** panel‌ as follows:

![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/e18211cb-1f49-44c0-9321-e249f7eaf366.png)

[fico_scores.json](https://content.gitbook.com/content/P6fxwYtQYia2gDgyWZ6L/blobs/zgH8nItfFufmaU5S56uj/fico_scores.json)

[Decision Table v4.json](https://content.gitbook.com/content/P6fxwYtQYia2gDgyWZ6L/blobs/8iPvLVGARsyG2Py6gU7o/Decision%20Table%20v4.json)
