# Dependency Definitions

> Source: https://manual.pvxplus.com/nomads-graphical-application/panel-designer/options-and-utilities/dependency-definitions

Dependency definitions in NOMADS are basically the equivalent of **IF THEN** and (optionally) **ELSE** conditions. They can define selected controls to be *hidden*, *shown*, *locked*, *unlocked*, *enabled* or *disabled* based on preset conditions. This functionality is similar to the PxPlus **\*wingrp** utility but with the following differences:

|  |  |
| --- | --- |
| • | Dependency definitions can be applied to a single control or several controls without first creating a group, although groups may also be used. |
| • | Unlike **[Group Assignment](https://manual.pvxplus.com/nomads-graphical-application/nomads-development/maintaining-library-objects/group-assignment)**, the definitions are maintained within NOMADS (\*winproc manages the implementation at run time). Dependencies are scanned after Post Display logic executes for the panel and will continue to be monitored after each logic event executes on a control. All definitions are created and maintained entirely within the utility - no code needs to be added to your panels or program. |

Invoke the **Dependency Definition** utility from the **[NOMADS Panel Designer](https://manual.pvxplus.com/nomads-graphical-application/panel-designer/introduction)** by selecting *Utilities > Dependency Definition* from the menu bar.

The following window is displayed:

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

Each dependency definition created in the table will consist of a *conditional expression*, as well as one or more *actions* and/or *logic* to be performed when the *Condition* is true.

This window consists of the following:

|  |  |
| --- | --- |
| *Condition* | Conditional expression to be tested. |
| *Actions for Controls* | Assigns functions to be applied to selected controls when the *Condition* tests true. Click the dotted button to invoke the **Actions for Controls** window.<br>![](https://manual.pvxplus.com/migration-assets/b902e5f2dd9ab60d23b09b89c89a5c96fd31fbae919686892526045e9ce5d37b.jpg)<br>This window consists of the following:<br>\|  \|  \|<br>\| --- \| --- \|<br>\| *Condition* \| Conditional expression (previously entered). \|<br>\| *Control Name* \| Preset list of controls existing in the current active panel. This includes controls from embedded panels, which are identified by including their panel name.<br>*(Embedded panels were added to the Dependency Definition in PxPlus 2018.)* \|<br>\| *Type* \| Control type. \|<br>\| *Function* \| Function to be applied to the control when the *Condition* is ***true***. Click the drop-down arrow for a list of selections: *Ignore, Enable, Disable, Show, Hide, Lock, Unlock*. \|<br>\| *Tab Table* \| ***(Applicable to Controls on the Main Panel Only)***<br>Tab behaviour override to be applied to the control when the *Condition* is ***true***. Click the drop-down arrow for a list of selections: *Ignore, Add, Remove*. \|<br>\| *Insert Before* \| Sets location in **Tab Order** for when the *Action* is to be applied (if *Tab Table* override is set to *Add*). Click the drop-down arrow for a list of existing panel controls. \|<br>\| *OK* \| Saves any changes and closes the **Actions for Controls** window. \|<br>\| *Cancel* \| Cancels any changes and closes the **Actions for Controls** window. \| |
| *Actions for Groups* | Assigns functions to be applied to selected groups when the *Condition* tests true. Click the dotted button to invoke the **Actions for Groups** window.<br>![](https://manual.pvxplus.com/migration-assets/305ea9e981f4e54752cef2c2f5321b9805300c6da152af2b48f5e555484b34e5.jpg)<br>This window consists of the following:<br>\|  \|  \|<br>\| --- \| --- \|<br>\| *Condition* \| Conditional expression (previously entered). \|<br>\| *Group Name* \| Preset list of groups created in the current active panel. See **[Group Assignment](https://manual.pvxplus.com/nomads-graphical-application/nomads-development/maintaining-library-objects/group-assignment)**.<br>This includes groups from embedded panels, which are identified by including their panel name.<br>*(Embedded panels were added to the Dependency Definition in PxPlus 2018.)* \|<br>\| *Function* \| Function to be applied to the group when the *Condition* is ***true***. Click the drop-down arrow for a list of selections: *Ignore, Enable, Disable, Show, Hide, Lock, Unlock*. \|<br>\| *OK* \| Saves any changes and closes the **Actions for Groups** window. \|<br>\| *Cancel* \| Cancels any changes and closes the **Actions for Groups** window. \| |
| *Invert* | Check box to apply the *opposite* function for when the *Condition* tests ***false***. Same as an **ELSE** statement.  <br>  <br>***Example:***  <br>  <br>If a control is set to *Enabled* and the *Condition* tests false, the control will be *Disabled* instead. This does ***not*** apply to *Logic* functions. |
| *Logic* | Logic to be executed when the *Condition* tests ***true***. Click the dotted button to invoke the **Logic** window for creating or editing this string.<br>Available processes include *Ignore, Link, Perform, Call, Execute, Help, Jumpto* and *End*. See **[Actions and Parameters](https://manual.pvxplus.com/nomads-graphical-application/program-interaction/events-logic/actions-and-parameters)**. |
| *Insert Above  <br>Insert Below* | Adds a blank row above or below the currently selected row. |
| *Delete* | Removes the currently selected row (i.e. removes the definition). |
| *Move Up  <br>Move Down* | Changes the order of the existing definitions. |
