# Smart Controls

> Source: https://manual.pvxplus.com/nomads-graphical-application/smart-controls/overview

NOMADS ***Smart Controls*** allow you to create controls that auto-load data. A dataset based on a Query object definition can be automatically loaded into all types of **[List Box](https://manual.pvxplus.com/nomads-graphical-application/creating-panel-controls/list-box-controls/list-box-type)**, **[Drop Box](https://manual.pvxplus.com/nomads-graphical-application/creating-panel-controls/drop-box-control/drop-box-properties)**, **[Grid](https://manual.pvxplus.com/nomads-graphical-application/creating-panel-controls/grid-control/grid-properties)**, **[Multi-Line](https://manual.pvxplus.com/nomads-graphical-application/creating-panel-controls/multi-line-control/multi-line-properties)** or **[Chart](https://manual.pvxplus.com/nomads-graphical-application/creating-panel-controls/chart-control/chart)** controls or written into a data file - ***with little or no additional coding***.

***Standard List Boxes***, ***Drop Boxes*** and ***List View List Boxes*** will display lists consisting of a ***single*** column. ***Formatted List Boxes***, ***Report View List Boxes*** and ***Grids*** will display ***multiple*** columns with titles. ***Smart Multi-Lines*** are ***display-only*** lookup fields that are loaded with a single value. ***Smart Charts*** will display a graphical representation of the data.

With ***Smart List*** controls, you can set up columns and filter records based on a simple Query List definition. Column formats can be derived automatically from the Query definition; however, you can override this. The Query definition also supplies the information to automatically do all the file handling to create the dataset that will be loaded into the Smart control, including reading the main and cross-reference files and filtering the data to attain only the required records.

***Smart Chart*** controls are based on Query+ *public* AutoChart definitions, which can be created in the **[Query Definition](https://manual.pvxplus.com/nomads-graphical-application/dictionary-based-development/query-subsystem/query-definition)** or at run-time through the **[Query AutoChart](https://manual.pvxplus.com/nomads-graphical-application/dictionary-based-development/query-subsystem/run-time-query#charts)** feature.

You can also determine exactly when to load and reload the Smart control by specifying the fields/variables that will trigger that event. When the value in a trigger variable changes, this causes the Load logic to be invoked. If no trigger variable is specified, the list will be loaded after the panel is drawn. For further control, a conditional trigger test can be defined so that the loading process is only invoked when the test is true. Pre- and Post-Load logic may also be specified. Any type of List Box, Drop Box, Grid, Multi-Line or Chart can be used with any selection of attributes.

***Smart Controls*** can also be used to load the dataset into a ***data file*** instead of a NOMADS control. A **CALL** to the **\*winlist** interface loads the data into a **[Keyed File](https://manual.pvxplus.com/pxplus-user-guide/file-handling/data-files/keyed-files)** (with internal or external keys), a **[Serial File](https://manual.pvxplus.com/pxplus-user-guide/file-handling/data-files/serial-files)**, or a keyed **[\*MEMORY\*](https://manual.pvxplus.com/file-handling/memory)** file. Key information is derived from the first column of the Query definition. The resulting file can be used as a temporary file, for example, when creating reports.

Note:  
*Smart Controls* are *not* compatible with Load On Demand or Background Load logic.  
  
*Smart Multi-Lines* are *not* compatible with [EZ Load](https://manual.pvxplus.com/nomads-graphical-application/creating-panel-controls/multi-line-control/ez-load-multiline) logic.

## See Also

|  |  |
| --- | --- |
| ***Smart List Boxes, Drop Boxes, Grids, Multi-Lines:*** | **[Creating a Smart Control Definition](https://manual.pvxplus.com/nomads-graphical-application/smart-controls/defining-smart-controls#Mark2)** |
| ***Smart Charts:*** | **[Creating a Smart Chart Definition](https://manual.pvxplus.com/nomads-graphical-application/smart-controls/defining-smart-controls#Mark5)** |
| ***Smart File:*** | **[Creating a Smart File](https://manual.pvxplus.com/nomads-graphical-application/smart-controls/creating-a-smart-file)** |
