# Extended Class Validation and Display

> Source: https://manual.pvxplus.com/data-dictionary/data-classes/extended-validation

Extended Validation is used to provide additional table validation and allow access to data elements for creating *display-only*Multi-Line controls when designing NOMADS panels. At run time, when a valid value is entered, the Extended Validation Multi-Line controls are populated with existing data from the table.

To define ***Extended Validation***, access the **Validation** tab for a **[Multi-Line Data Class](https://manual.pvxplus.com/data-dictionary/data-classes/multiline#validation)**.

See the tutorial **[How to Use Extended Class Validation and Display](https://manual.pvxplus.com/how-to/how-to-use-extended-class-validation)**.

![](https://manual.pvxplus.com/migration-assets/b22ec74889b1933413ef20df41c57313f8a18b1ed72b789c36eb3ed5a8f00695.png)

Note:  
Extended Validation is defined *only* for *Multi-Line* data classes that are [Dynamic](https://manual.pvxplus.com/data-dictionary/data-classes/multiline#dynamic). For information on creating a dynamic data class, see [Dynamic Control Properties](https://manual.pvxplus.com/data-dictionary/data-classes/dynamic).

When working with Grids in the NOMADS Panel Designer, a data class can be assigned in **[Grid Presets Definition](https://manual.pvxplus.com/nomads-graphical-application/creating-panel-controls/grid-control/presets-definition#dataclasses)** by selecting the *Class* property. If assigning a Multi-Line data class that has ***Extended Validation***, additional table validation will be provided at run time when a value is entered.

*(Extended Validation was added in PxPlus 2019.)  
(Support for Extended Validation in Grids was added in PxPlus 2019 Update 1.)*

The following two examples include detailed steps on how to define ***Extended Validation*** and how it is subsequently used with *Multi-Line* and *Grid* controls when designing a NOMADS panel.

|  |  |
| --- | --- |
|  | **[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)** |

Both examples use the **Sales Rep** table, which consists of the data elements below.

|  |  |
| --- | --- |
|  | ![](https://manual.pvxplus.com/migration-assets/95e46c3a11f8322a0354abd13619986da1ac89901af8b7b94d399294ec713baa.jpg)  <br>***Sales Rep Table: Data Elements*** |

## Example: Extended Validation (Multi-Lines)

This example includes the following steps for defining *Extended Validation*, creating Multi-Line controls and viewing run-time examples of a NOMADS panel:

- **[Step 1](https://manual.pvxplus.com/data-dictionary/data-classes/extended-validation#step1_ml)**: Create a dynamic Multi-Line data class with Extended Validation.
- **[Step 2](https://manual.pvxplus.com/data-dictionary/data-classes/extended-validation#step2_ml)**: Create a Multi-Line control with the Extended Validation data class. This control will be used to enter the value to validate.
- **[Step 3](https://manual.pvxplus.com/data-dictionary/data-classes/extended-validation#step3_ml)** and **[Step 4](https://manual.pvxplus.com/data-dictionary/data-classes/extended-validation#step4_ml)**: Create additional ***display-only*** Multi-Line controls from other table data elements. These controls will be populated when a valid value is entered.
- **[Step 5](https://manual.pvxplus.com/data-dictionary/data-classes/extended-validation#step5_ml)**: Panel recap that shows all the Multi-Line controls created in this example.

Note:  
In the File Maintenance Generator, the [Fields](https://manual.pvxplus.com/nomads-graphical-application/dictionary-based-development/fmgen/field-layout#fields_list) list will display Extended Validation descriptive fields (i.e. SHOW.xxxxxx) *only* if this functionality was defined for a corresponding data element that is also part of a key with more than one segment. When displayed, the descriptive fields can be easily added to the layout grid for the panel being generated. See [Extended Validation Descriptive Fields (SHOW.xxxxxx)](https://manual.pvxplus.com/nomads-graphical-application/dictionary-based-development/fmgen/add-remove-fields#add_show).

To begin:

***Step 1*: Create a Multi-Line Data Class with Extended Validation**

In **[Data Class Definitions](https://manual.pvxplus.com/data-dictionary/data-classes/multiline)** maintenance, create a Multi-Line data class. Name it **SALESCD** and select the *Dynamic* check box.

On the **Validation** tab, select the *Use Extended Validation* check box. Enter the **Extended Validation** settings below.

|  |  |
| --- | --- |
|  | ![](https://manual.pvxplus.com/migration-assets/07eefb040e616e2acf8bb6da45db4d78ba7794b1cca816cffbe6c622809b0fcb.png)  <br>***"SALESCD" Data Class with Extended Validation*** |

***Step 2*: Create a Multi-Line Control with the Extended Validation Data Class**

In Step 1, ***SalesrepKey: Sales Rep Code*** was selected for the *Key*. This is the value to be validated.

On the NOMADS panel, create a Multi-Line control with the Extended Validation data class. Name the Multi-Line control **SALES** and for the *Class*, enter **SALESCD**.

|  |  |
| --- | --- |
|  | ![](https://manual.pvxplus.com/migration-assets/80b7c14bca5c73c048eaf1dfbfe2b0749e56903623857105dfc0bfe78c5c13d9.png)  <br>***"SALES" Multi-Line***![](https://manual.pvxplus.com/migration-assets/f21d22360fd1bdf9a24cd97939ddee18ffdcdd5254c7068ec57e08c905949368.png)![](https://manual.pvxplus.com/migration-assets/ed889ddae1301b62656fde3de15f0c1915abad17305dbd88fd3339b115b87370.png)  <br>***"SALES" Multi-Line with Extended Validation Data Class "SALESCD"*** |
|  | Note:  <br>On the Validation tab, the dynamic values for Validator and Formatter differ from the "standard" dynamic values. Because Extended Validation was defined in the SALESCD data class, these values allow the code to automatically validate the entry and correctly format it at run time. |
|  | ![](https://manual.pvxplus.com/migration-assets/f21d22360fd1bdf9a24cd97939ddee18ffdcdd5254c7068ec57e08c905949368.png)![](https://manual.pvxplus.com/migration-assets/4d23fae4c293e12fdebffb128773728643ff6f43a58d945b2440d1a235395666.png)  <br>***Run-Time Example: Sales Rep Code Validation*** |

***Step 3*: Create a Multi-Line Control for the Descriptive Field**

In Step 1, ***Name$*** was selected for the *Descriptive Field*. This allows the ***Name*** data element to be available when designing the panel.

On the same panel, draw another Multi-Line control. Name it **SHOW.SALES**. This Multi-Line control will automatically display the Salesperson's Name when a valid Sales Rep Code is entered.

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
|  | ![](https://manual.pvxplus.com/migration-assets/a87e3c08870b4f7aefa7f90e5a5358f8d6e072a95423d8e0206722c067be0d11.png)  <br>***SHOW.SALES Multi-Line*** |  |  |  |
|  | Important Note:<br>When creating a Multi-Line control for the Descriptive Field, the Multi-Line Name **must** have the following format:  <br>  <br> SHOW.name.element![](https://manual.pvxplus.com/migration-assets/41853e43cb14e6a0857c7c8f2ba57a073942e001182851db9c73486c556882e7.png) |  |  |  |
|  | ![](https://manual.pvxplus.com/migration-assets/7ed3da4341358517d7c7b2bb45dd8d670ac183db5c881b56dfec9a8458421f12.jpg)  <br>***SHOW.SALES Multi-Line***![](https://manual.pvxplus.com/migration-assets/a0cab41d73bd1dd6958981831da5ddc42e700b78c278fb3c47328211a570b5f6.png)![](https://manual.pvxplus.com/migration-assets/6d52cb0ecc04b1e14a7e4d57df97adef8312ab02e4d73ea4b7e527562d17b9a6.png)  <br>***Run-Time Example: Validation with Salesperson Name Displayed*** |  |  |  |
|  |  |  |  |  |

***Step 4*: Create Multi-Line Controls for Other Data Elements**

In Step 1, the *Populate All Fields* check box was selected. This allows all data elements to be available when designing the panel.

On the same panel, draw Multi-Line controls for the three data elements below, using the names provided. These Multi-Line controls will automatically populate with data when a valid Sales Rep Code is entered.

|  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
|  | **Data Element** | **Multi-Line Control Name** |  |  |  |
|  | Department$ | **SHOW.SALES.DEPARTMENT** |  |  |  |
|  | ytdOrders | **SHOW.SALES.YTDORDERS** |  |  |  |
|  | ytdSales | **SHOW.SALES.YTDSALES** |  |  |  |
| Note:  <br>The Multi-Line control Name **must** correspond with the name given to the element in the data dictionary. |  |  |  |  |  |
|  | ![](https://manual.pvxplus.com/migration-assets/1d3712b071c9d5ffe525b2b034adc57e7bb85b0af31d45c20f2b8e6ae980231f.png)  <br>***Multi-Lines for Other Data Elements*** |  |  |  |  |
|  | ![](https://manual.pvxplus.com/migration-assets/a0cab41d73bd1dd6958981831da5ddc42e700b78c278fb3c47328211a570b5f6.png)![](https://manual.pvxplus.com/migration-assets/04ddada0a191e4e803b93abee2869c0a5d8af9b1148c7fd58d34430ccb2a606b.png)  <br>***SHOW.SALES.DEPARTMENT Multi-Line***<br>![](https://manual.pvxplus.com/migration-assets/2071f540074a931f12375631a2fd2586c8c315ac81d1d34b4b0a709374eb02e5.png)  <br>***SHOW.SALES.YTDORDERS Multi-Line***<br>![](https://manual.pvxplus.com/migration-assets/58866fda6638bc20f56c662845206b48007256ca8f3292205ad5efacbbd79e2a.png)  <br>***SHOW.SALES.YTDSALES Multi-Line*** |  |  |  |  |
|  | ![](https://manual.pvxplus.com/migration-assets/a0cab41d73bd1dd6958981831da5ddc42e700b78c278fb3c47328211a570b5f6.png)![](https://manual.pvxplus.com/migration-assets/c2280dd13d40f5b5d702074d72324ab44a8fea30c2e8230fdd673dacbf2a2239.png)  <br>***Run-Time Example: Validation with Department, YTD Orders and YTD Sales Populated*** |  |  |  |  |
|  |  |  |  |  |  |

***Step 5*: Panel Recap**

The end result is a panel created with the following Multi-Line controls for Extended Validation:

|  |  |
| --- | --- |
|  | ![](https://manual.pvxplus.com/migration-assets/b5e36128a15fe8e29f5fa8d83b8abd15a4dd8029cbcbb1378863aeb68a83f142.png) |

To make it easier to create Multi-Line controls for Extended Validation data elements, the **[Extended Class Browse](https://manual.pvxplus.com/nomads-graphical-application/creating-panel-controls/multi-line-control/extended-class-browse)** can be used. It shows a list of all the table data elements that can be added to a panel. When a data element is selected, the appropriate Multi-Line properties, including the *Name*, are defined.

|  |  |  |  |
| --- | --- | --- | --- |
|  | ![](https://manual.pvxplus.com/migration-assets/a6b9ceee637f05cf1d59a1454a2dcf36c7ce3dee3c6175c9d1da855c8c933cd1.png)  <br>***Extended Class Browse: Department Data Element Selected*** | ![](https://manual.pvxplus.com/migration-assets/05aa70086ff104bd010a6bc57edc2470605be9fd18d095a0b94aee4e8eef591d.png) | ![](https://manual.pvxplus.com/migration-assets/537e72a708bd8c136843d5081385192fde40b7cece699cbd2907ad9119249e8f.png)  <br>***Multi-Line Properties: SHOW.SALES.DEPARTMENT*** |

## Example: Extended Validation (Grids)

This example includes the following steps for defining Extended Validation, adding the Extended Validation data class to a Grid and viewing run-time examples of a NOMADS panel:

- **[Step 1](https://manual.pvxplus.com/data-dictionary/data-classes/extended-validation#step1_grid)**: Create a dynamic Multi-Line data class with Extended Validation.
- **[Step 2](https://manual.pvxplus.com/data-dictionary/data-classes/extended-validation#step2_grid)**: Add the Extended Validation data class to **Grid Presets Definition** and then specify the column, row or cell to be used for entering the value to be validated.

To begin:

***Step 1*: Create a Multi-Line Data Class with Extended Validation**

If desired, a new Multi-Line data class can be created by following **[Step 1](https://manual.pvxplus.com/data-dictionary/data-classes/extended-validation#step1_ml)** of the above example.

Since a Multi-Line data class (**SALESCD**) with Extended Validation was previously created, it will be used for this example. Proceed to **[Step 2](https://manual.pvxplus.com/data-dictionary/data-classes/extended-validation#step2_grid)**.

|  |  |
| --- | --- |
|  | ![](https://manual.pvxplus.com/migration-assets/63013cddc47972a2902d9fbe2766bbf80df9c8e94efd43025e67272ce13d8cd7.png)  <br>***"SALESCD" Data Class with Extended Validation*** |

***Step 2:* Add the Extended Validation Data Class to Grid Presets Definition**

When **SALESCD** was created, ***SalesrepKey: Sales Rep Code*** was selected for the *Key*. This is the value to be validated.

On the NOMADS panel, create a new or select an existing Grid control. In the **Grid Properties** dialog, select the **[Presets](https://manual.pvxplus.com/nomads-graphical-application/creating-panel-controls/grid-control/grid-properties#presets)** tab.

In the *Property* column, select *Class* from the drop-down list. Specify the desired *Column*/*Row* that will be used to enter the value to be validated. In the *Value/Expression* column, select the **SALESCD** class from the query.

|  |  |
| --- | --- |
|  | ![](https://manual.pvxplus.com/migration-assets/a7c7f71136b33af43d368453fe59c6dfd4f81e2d4becbef5d3f69ddcac5c96ad.png)![](https://manual.pvxplus.com/migration-assets/d52979e1d17e2af380635637eeac5f72cd6892aa48b12bfa0ee8dae9717c1974.png)![](https://manual.pvxplus.com/migration-assets/f11f3403fea94f1bc07a5788e129e196d2d7fa794b245b62b6e0960b35f5f9ec.png)  <br>***Run-Time Example: Valid Sales Rep Code Entered***![](https://manual.pvxplus.com/migration-assets/62e6a7a18acbe5ac639e5702c21c3134022a6f568d43d69f71604a20c49fac8d.png)  <br>***Run-Time Example: Invalid Sales Rep Code Entered*** |

## See Also

**[Populate from Data Source](https://manual.pvxplus.com/data-dictionary/data-classes/populate-from-data-source)**  
**[File Maintenance Generator](https://manual.pvxplus.com/nomads-graphical-application/dictionary-based-development/fmgen/fmgen-introduction)**
