# Dynamic validation

Dynamic validation lets you choose a configuration area and decide which of its fields are
mandatory. Use it when the information required from users must differ between configuration
areas.

| If you need to… | Go to |
|---|---|
| Open the settings area | [Open Dynamic validation](#open-dynamic-validation) |
| Identify the selectors and field list | [Understand the screen](#understand-the-screen) |
| Change a field's mandatory setting | [Set mandatory fields](#set-mandatory-fields) |
| Leave after changing a setting | [Handle configuration branches](#handle-configuration-branches) |
| Return to the configuration area | [Configuration](configuration-home.md) |
| Review general error messages | [General error messages](general-error-messages.md) |
| Resolve an unavailable or failed action | [Common issues and solutions](common-issues-and-solutions.md) |

## Before you start

Before changing a mandatory setting, check that the feature and editing permission are available.
The field list depends on the module and sub-module you select.

**Prerequisites**

- The mandatory-fields configuration feature is included in your subscription.
- You have edit permission for the configuration area if you need to change or save settings.
- You know which module and sub-module you want to configure.
- You have no unsaved changes from an earlier selection when you start a new configuration task.

If the feature is unavailable, the page shows the subscription-upgrade surface instead of the
configuration controls. If you can view the page but cannot edit it, the editor controls are not
available. With these conditions in place, open Dynamic validation.

## Open Dynamic validation

Open this page to select a module and review its mandatory-field settings.

**Prerequisites**

- You are signed in to PAMS.
- The Dynamic validation route is available to you.

**Steps**

1. In the **Configuration** menu, select **Dynamic validation**.
2. Confirm that the page shows the **Configuration** breadcrumb and the **Dynamic Validation**
   page label.

![The configuration page with **Choose Module** and save controls](https://atloriaassets.blob.core.windows.net/assets/a438221c-c1af-407c-b9e6-a56c986db846/42a007d927ead25a2511140e988eeb98.png)

**Result:** The Dynamic validation screen is open with **Choose Module** visible.

## Understand the screen

The screen uses **Choose Module** for the module choice. A property grid lists the fields returned
for the selected module and sub-module. After you choose a module, choose its available sub-module
and review the returned fields.

| Area | What it contains | When it appears |
|---|---|---|
| **Choose Module** | The module choices control | When the configuration feature is available |
| **Which Sub-Module** | Radio choices from the selected module's sub-module list | When that list contains entries |
| **Field** | The field-name column in the property grid | When the selected sub-module returns property rows |
| **IsMandatory** | The boolean column for each property row | When the selected sub-module returns property rows |
| **Last Modifications** | The audit-history area | When the selected configuration has a company record |

The **IsMandatory** value is changed from the property-grid row. It is not a separate checkbox. On
the initial screen, **Choose Module** is present; the property rows, **IsMandatory** values, and
**Last Modifications** area appear after the relevant configuration is loaded.

The initial module choices shown under **Choose Module** are Tickets, Account, LG, Purchase, and Sales.

![The open **Choose Module** control and its module choices](https://atloriaassets.blob.core.windows.net/assets/a438221c-c1af-407c-b9e6-a56c986db846/597ff3505fe727563b5f2d86591602dd.png)

## Set mandatory fields

Change a field’s mandatory setting and save the configuration.

**Prerequisites**

- The configuration screen is open.
- You can edit the configuration.
- You know the module and sub-module to change.

**Steps**

1. Select **Choose Module**.
2. Select the module you want to configure from the available choices.
3. If **Which Sub-Module** appears, select the sub-module you want to configure.
4. In the property grid, select the row whose **Field** value you want to change.
5. Select the row again for each field whose **IsMandatory** value you want to change.
6. Choose the save route:

   | If you need to… | Select |
   |---|---|
   | Keep working on the configuration page | **Save** |
   | Save the configuration and leave the page | **Save and Close** |

7. Read the save result.

The save controls are available to editors after the selected configuration changes. They are
disabled when there are no changes.

**Result:** The selected mandatory-field configuration is saved, or **Save and Close** leaves the
page after saving.

## Handle configuration branches

The available path changes according to subscription access, edit permission, returned
sub-modules, and whether you have changed the selected settings.

**Prerequisites**

- The Dynamic validation screen is open.
- You know whether you are reviewing, changing, or leaving the selected configuration.

**Steps**

1. Select **Which Sub-Module**, a property row, **Last Modifications**, the close control, or the
   applicable popup action named in the matching row.

| Situation | What appears or happens | Reader action |
|---|---|---|
| The feature is unavailable | The subscription-upgrade surface replaces the configuration controls | Use the subscription route available to you |
| The sub-module list contains entries | **Which Sub-Module** appears | Select the applicable sub-module option |
| The selected sub-module returns property rows | The property grid appears | Select a property row to change its mandatory setting |
| The selected configuration has a company record | **Last Modifications** appears | Select the tab to review the audit history |
| You have edit permission and no changes | The editor close action leaves the page | Select the close control in the editor header |
| You have edit permission and unsaved changes | A save-changes popup opens | Choose the applicable popup action |
| You do not have edit permission | The non-editor close action leaves the page | Select the close control in the editor header |

2. When unsaved changes trigger the popup, read the title `Leaving Page` and the message `Do you want
   to save your changes?` Choose one action:

   | If you need to… | Select |
   |---|---|
   | Keep the changes | **Save** |
   | Leave without saving | **Don't Save** |
   | Return to the configuration page | **Cancel** |

**Result:** You remain on the page, save before leaving, or leave without saving according to the
action you selected.

## When configuration goes wrong

Use the message text to identify whether the problem occurred while loading a module, loading a
sub-module or property list, or saving the configuration.

**Prerequisites**

- A message is displayed after you select a module, select a sub-module, or save the configuration.

**Steps**

1. Read the message text.
2. Locate the message and operation in the matching table row.

| Message | Where it appears | What to do |
|---|---|---|
| `Server Error` | Module-list, sub-module-list, or property-list loading | Repeat the affected selection from the corresponding procedure |
| `Server Error` | Saving the mandatory-field configuration | Repeat the save action after reviewing the selected field row |
| `Your Company Mandatory Fields has been Saved Successfully` | After a successful save | Continue on the page or use **Save and Close** when you are finished |
| `Leaving Page` | Save-changes popup title | Choose **Save**, **Don't Save**, or **Cancel** according to your intended result |
| `Do you want to save your changes?` | Save-changes popup message | Choose the popup action that matches your intended result |

3. Repeat the affected selection or save action, continue after a successful save, or choose
   **Save**, **Don't Save**, or **Cancel**, as the matching row directs.

**Result:** You have identified the message and taken the corresponding loading, save, or
save-changes action.

## After saving

The saved configuration remains associated with the selected module and sub-module. When the
selected configuration has a company record, **Last Modifications** provides the place to review
its audit history.

**Prerequisites**

- The selected configuration has a company record if you want to review **Last Modifications**.

**Steps**

1. Select **Last Modifications**.
2. Review the audit-history area.
3. Return to [Configuration](configuration-home.md) when you need another settings
   area.

**Result:** The configuration history area is open, or the configuration area is available
for the next settings task.
