# Reference category question units

## Reference category question units

Reference category question units connect a category question with one or more units used in
category configuration. Open the Questions unit list.
The page title is **Questions unit**, and a new entry opens in a `New Question unit` dialog.

| If you need to… | Go to |
|---|---|
| Review the list and its columns | [Find and review the list](#find-and-review-the-list) |
| Understand the fields and rules | [Understand the fields and rules](#understand-the-fields-and-rules) |
| Create or change a unit entry | [Add or edit an entry](#add-or-edit-an-entry) |
| Maintain related category data | [Reference category](configuration-reference-list-reference-category-view.md) |
| Return to the wider reference-list area | [Reference list data](reference-list-data.md) |
| Resolve a maintenance message | [When saving or deleting goes wrong](#when-saving-or-deleting-goes-wrong) |

## Before you start

Before maintaining a unit entry, have the category and its questions available for selection,
the unit value or values to record, and the access needed for the action you intend to take.
**Category** loads category-question data, and **Category qustion** uses the questions associated
with the selected category.

| Have or confirm | Why it matters |
|---|---|
| Access to the configuration area | The list and **New** action depend on the subscription condition. |
| Permission to edit | The row edit action is available only when editing is allowed. |
| Permission to delete | The row delete menu is available only when deletion is allowed. |
| Category reference data | **Category** supplies the categories available for selection. |
| Questions for the selected category | **Category qustion** uses the associated questions. |
| Unit value or values | Each **Unit** entry is required. |

With the reference data and access in place, find the Questions unit list and review its entries.

## Find and review the list

The Questions unit list is where you review category-question unit entries before opening an
existing row or creating a new one.

**Prerequisites**

- You have the access and reference data described in [Before you start](#before-you-start).

**Steps**

1. Open the Questions unit list.
2. Confirm the page title is **Questions unit**.

   ![The Questions unit title and arrival controls](https://atloriaassets.blob.core.windows.net/assets/a438221c-c1af-407c-b9e6-a56c986db846/5d86489b55f7fbe1ba5781d96239c6a3.png)

3. Read the visible list headers.
4. Confirm the headers are **Category** and **Question**.
5. Choose the list action you need.

   | If you need to… | Select… |
   |---|---|
   | Reload the list | **Refresh** |
   | Inspect list settings | **Settings** |
| Create an entry | **New** |

   ![The Questions unit list with Category and Question headers](https://atloriaassets.blob.core.windows.net/assets/a438221c-c1af-407c-b9e6-a56c986db846/410c6c1915a43d9783f21a13fd876f38.png)

**Result:** You have reviewed the **Category** and **Question** columns and can choose the list
action needed for the next task.

## Understand the fields and rules

The list shows the category and question for each entry. The dialog uses **Category**,
**Category qustion**, and **Category questions unit** before you enter one or more **Unit** values.

| Field or list value | What it does | Rule |
|---|---|---|
| **Category** | Selects the category used to load its questions. | Required in the new/edit dialog. |
| **Category qustion** | Selects a question associated with the selected category. | Required in the new/edit dialog. |
| **Category questions unit** | Groups the unit entries in the dialog. | Required in the new/edit dialog. |
| **Unit** | Holds one unit value. | Required for each unit entry. |
| **Category** in the list | Identifies the category for the entry. | Shown as a list column. |
| **Question** in the list | Identifies the question for the entry. | Shown as a list column. |

Select **Category** before **Category qustion**; the available questions depend on the selected
category. The three dialog fields carry required markers. The units collection is shown
in the dialog, while the grid does not edit rows directly; use the row edit action instead.

The fields and rules are clear before you begin adding or editing an entry.

## Add or edit an entry

Adding or editing a category-question unit entry records the selected category, its question,
and one or more unit values in the new/edit dialog.

**Prerequisites**

- You are on the **Questions unit** list.
- The category and its questions are available for selection.
- **New** is available, or the row edit action is available for the existing entry.

**Steps**

1. Choose the entry point for the task.

   | If you need to… | Select… |
   |---|---|
   | Create a new entry | **New** |
   | Change an existing entry | The row edit action |

2. For a new entry, confirm that the dialog title is `New Question unit`.

   ![The new question-unit dialog with its required fields](https://atloriaassets.blob.core.windows.net/assets/a438221c-c1af-407c-b9e6-a56c986db846/d6386f8056d7d5452afcbf9f0f4a8184.png)

3. In **Category**, select the category whose question you are configuring.
   The **Category qustion** selector lists question records from the selected category and displays
   each record's question text.
4. In **Category qustion**, select the associated question.
5. In **Category questions unit**, enter the unit value.
6. Select **Add more** when the entry needs another unit value.

   ![The dialog after another unit entry is added](https://atloriaassets.blob.core.windows.net/assets/a438221c-c1af-407c-b9e6-a56c986db846/1141e90ddfc4e1bef5330991b7eb31c4.png)

7. Enter a value in each additional **Unit** entry.
8. Select the unlabeled control immediately beside a unit entry to remove that entry.
9. Select **OK** to submit the dialog.

The form validates before saving.

**Result:** The new/edit dialog contains the selected category, associated question, and unit
entries, and **OK** submits the form.

## Delete an entry and handle availability

The row's delete menu is available only when deletion is allowed. More than one item must remain
in the list before the delete action is available.

**Prerequisites**

- You are on the **Questions unit** list.
- The row's delete menu is available.
- More than one item remains in the list.

**Steps**

1. Open the row's delete menu.
2. Select **Delete**.
3. Read `Are you sure you want to delete this item?` before continuing.

   | If you see… | Use this route |
   |---|---|
   | The list and **New** action | Continue when the subscription condition permits the feature. |
   | No **New** action | Use an existing row when its edit action is available. |
   | No row delete menu | Do not delete that row. |
   | No row edit action | Use the controls available for your access. |

**Result:** You have read the deletion confirmation and can decide whether to continue.

## When saving or deleting goes wrong

Use the exact message shown on screen to choose the corrective action.

| Message | What to do |
|---|---|
| `This Field Is Required` | Complete the field marked as required. |
| `Required` | Enter a value in the unit entry marked as required. |
| `Just '_' '-' And '.' Characters Accepted` | Replace disallowed characters with accepted characters. |
| `Forbidden characters detected. Please remove them and try again.` | Remove the forbidden characters and select **OK** again. |
| `Are you sure you want to delete this item?` | Check the selected row before continuing with deletion. |
| `Must have at least one item` | Keep at least one item in the list. |
| `Related to Saved data, Can't be deleted` | Keep the row and follow the saved-data dependency. |
| `Failed to Delete` | Review the row and repeat the delete action only when it remains available. |
| `Data updated Successfully` | Check the list for the updated row. |
| `Data saved Successfully` | Check the list for the new row. |
| `Data Deleted Successfully` | Check that the selected row no longer appears in the list. |

**Result:** You have the corrective action for the validation, confirmation, save, update, and
delete message shown by the screen.

## After maintaining the list

After maintenance, review the **Category** and **Question** values in the list and continue with
related reference data. The list reloads after a successful save, and the read-only dialog flow
ends when you press `Escape`.

| If you need to… | Go to |
|---|---|
| Continue configuring related category data | [Reference category](configuration-reference-list-reference-category-view.md) |
| Work with another reference-list entity | [Reference list data](reference-list-data.md) |
| Check the maintained row | Return to the **Questions unit** list and review **Category** and **Question**. |

**Result:** The list is ready for the next category-question unit maintenance task.
