# How to Use Extended Class Validation and Display

> Source: https://manual.pvxplus.com/how-to/how-to-use-extended-class-validation

**[Extended Class Validation](https://manual.pvxplus.com/data-dictionary/data-classes/extended-validation)** allows for additional data validation and the ability to add display-only fields based on a table when designing NOMADS panels.

For example, you may have a Customer Maintenance panel with a Salesperson Code field that you want to validate against the Salesperson table. You may also want to display the Salesperson Name and other related data when a valid Salesperson Code is entered.

The steps below show you how to accomplish this.

*(Extended Class Validation was added in PxPlus 2019.)*

## How to Define a Multi-Line Data Class with Extended Validation

|  |  |
| --- | --- |
| 1\. | In **Data Class Definitions** maintenance, create a new ***dynamic*** Multi-Line data class (i.e. SALESREP). |
| 2\. | On the **Validation** tab, select the *Use Extended Validation* check box. |
| 3\. | In the *Table* field, select the data table to be used for the validation. |
| 4\. | From the *Key* drop box, select the key to use for the verification. All the keys defined for the table are loaded. |
| 5\. | From the *Descriptive Field* drop box, select the data element (i.e. Salesperson Name) that is to be available when designing the NOMADS panel. All data elements from the table are loaded. |
| 6\. | Select the *Populate All Fields* check box to make all the data elements from the selected table available when designing the NOMADS panel. |
| 7\. | *(Optional)* You can override the standard validation message by selecting a message library in the *Error if Invalid* field. |
| 8\. | *(Optional)* Program logic can also be entered to override the standard validation message in the *Logic if not Found* field. |
| 9\. | Enter the other required fields and save the Data Class definition. |

## How to Create NOMADS Multi-Line Controls to Use with Extended Validation and Display

|  |  |
| --- | --- |
| 1\. | Call up the NOMADS panel. |
| 2\. | Create a new Multi-Line control and give it a name (i.e. SALESPERSON). Enter the data class SALESREP that you created earlier (in Step 1 above under **Data Class Definition**). |
| 3\. | Create another new Multi-Line control, which will be used for the Salesperson Name. |
| 4\. | To get the data you want, you can use ***one*** of the following two methods:<br>***Method 1:***  <br>  <br>In the Multi-Line control *Name* field, enter the name using the syntax **SHOW**.*name*.*element* (i.e. **SHOW**.SALESPERSON.NAME) where SALESPERSON is the name of the Multi-Line control created in Step 2, and NAME is the name of the data element from the table.  <br>  <br>***OR***  <br>  <br>***Method 2:***  <br>  <br>Click the *Extended Class Browse* button beside the Multi-Line control *Name* field to display the data elements from the table based on the SALESPERSON Multi-Line control created in Step 2. When a data element is selected, the same control *Name* syntax used in **Method 1** is created. |
| 5\. | When creating a **SHOW** Multi-Line control, the *Locked*, *Borderless* and *Transparent* attributes (on the **Attributes** tab) are automatically set. |
| 6\. | You can continue to create new Multi-Line controls and select other data elements to display as desired. |

## See Also

**[Example: Extended Validation (Multi-Lines)](https://manual.pvxplus.com/data-dictionary/data-classes/extended-validation#example_ml)**  
**[Example: Extended Validation (Grids)](https://manual.pvxplus.com/data-dictionary/data-classes/extended-validation#example_grid)**
