# Column Options

> Source: https://manual.pvxplus.com/nomads-graphical-application/dictionary-based-development/query-subsystem/column-options

***For a Data Dictionary/View Definition/Database Table***

When you select an item from the **File Elements** list in the **[Query Definition](https://manual.pvxplus.com/nomads-graphical-application/dictionary-based-development/query-subsystem/query-definition)** window, it is placed in the **Columns** list with default values for its title, format width and query derived from the data dictionary, view or table definition.

To change the values for a selected element, launch the **Column Options** window by using one of the following methods:

• Click the *Column Options* button on the **Query Definition** toolbar.  
 • Double click on the element.  
 • Right click on the element and then select *Update column properties* from the popup menu.

The **Column Options** window for the selected element is displayed:

![](https://manual.pvxplus.com/migration-assets/9a8c9b0995d5cc1327264667fd52313aa584b852a658d965475f5e196004f550.jpg)

***For a Manually-Defined File***

When you select a manually defined file from the **File Elements** list in the **Query Definition** window and click the selection button, the **Column Options** window is presented for defining the data element in terms of field number, offset, size and data type. See **[Field Definition](https://manual.pvxplus.com/nomads-graphical-application/dictionary-based-development/query-subsystem/column-options#fielddefinition)** and **[Manual Field Definition](https://manual.pvxplus.com/nomads-graphical-application/dictionary-based-development/query-subsystem/query-header#manualfielddef)**.

The **Column Options** window consists of the following:

|  |  |
| --- | --- |
| **Field Definition** | ***(Only Available for Manually-Defined Files)***<br>\|  \|  \|<br>\| --- \| --- \|<br>\| *Field No* \| Ordinal position of the field to be displayed; i.e. range 1 to *n*. Use Fld#0 (zero) to refer to an external key to a manual file. \|<br>\| *Offset and Size* \| Define sub-strings using the field **Offset** (integer, range 1 to *n*) and the **Size** of the sub-string (integer, number of characters/bytes).<br>NOMADS displays manual fields in the *Columns* list as Fld#*n* (where *n* is the Field No) or as Fld#*n*(*o*,*z*) for sub-strings (where *o* is the *o**ffset* and *z* is the *si**z**e*). \|<br>\| *Type* \| Toggle *String* or *Numeric* as your data type. \| |
| **Title** | Heading that users will see at the top of the column at run time (either a *Fixed* value, string *Expression* or *Message Library Reference*). |
| **Width** | Column width in columns. This can be adjusted as necessary, depending on the selected font.<br>Column widths can also be adjusted in ***Query+*** *Toolbar, Hybrid, Menu* and *Drop Query* views (see **[Query View](https://manual.pvxplus.com/nomads-graphical-application/dictionary-based-development/query-subsystem/query-header#queryview)** option) by clicking the **[Test/Design](https://manual.pvxplus.com/nomads-graphical-application/dictionary-based-development/query-subsystem/query-definition#testdesign)** toolbar button to display the query and dragging the column header to the desired size. Click the *Save + Exit* button to save and incorporate these settings into the query definition when exiting the query.<br>*(The ability to save query changes when in Test/Design mode was added in PxPlus 2023 Update 1.)* |
| **Alignment** | ***(Query+ and Drop Query)***<br>Alignment of the value within the column. Settings include *Default, Left, Center* and *Right* justification. The *Default* setting for ***text*** values is *Left* justification and *Right* justification for ***numeric*** values.<br>Note:  <br>Alignment affects *text displays only* so that just the column title of columns displaying images, percent bars, etc. are affected.<br>*(The Alignment option was added in PxPlus 2018.)* |
| **Format** | Can be either *Mask* or *Program*:<br>\|  \|  \|<br>\| --- \| --- \|<br>\| *Mask* \| PxPlus format mask for the column's data output (*Fixed* value or string *Expression*); e.g. a phone number mask such as 000-000-0000. \|<br>\| *Program* \| Name of the program called to format the display of the string data in this column; e.g. \*win/date;display. On the **ENTER** statement of the sub-program, include one argument (value of the column is passed by your query).<br>*Fixed* text or an *Expression* can define the mask or name the program. \| |
| **Display Option** | Click the *Define* button to launch the **Query Column Display** window where you can assign visual attributes, such as bold text, text color, highlight color, or an image, to a column. See **[Query Column Display](https://manual.pvxplus.com/nomads-graphical-application/dictionary-based-development/query-subsystem/query-definition)** below. |
| **Sort Options** | ***(String Only, Query+, Drop Query and Classic Query with Sort by Column Option)***<br>The following sort options can be assigned to a column: *Sort As Is; Use Sort Algorithm; Date Sort*:<br>\|  \|  \|<br>\| --- \| --- \|<br>\| *Sort Algorithm* \| ***(Available when Use Sort Algorithm option is selected)***<br>Enter a PxPlus expression to be used as an alternate algorithm for sorting the column.<br>***Example:***<br>A column containing a date stored in a MMDDYYYY format can be displayed as MM/DD/YYYY using a "XX/XX/XXXX" format mask. However, to sort the column chronologically by year, month, day, you can set up a sort algorithm such as DT$(5,4)+DT$(1,2)+DT$(3,2).<br>Note:   <br>While this would be necessary for proper sorting in a *Classic Query*, *Query+* and *Drop Query* can use the Date Sort to accomplish this as well. \|<br>\| *Sort Key Length* \| ***(Available when Use Sort Algorithm option is selected)***<br>Number of characters to be used to sort the column when using a sort algorithm. Default value is the length of the field to a maximum of 128. \|<br>\| *Date Sort* \| ***(Query+, Drop Query)*** ***(Available when Date Sort option is selected)***<br>Enter or select a string consisting of D, M and/or Y (day, month year) to describe the order in which they occur in the data.<br>***Example:***<br>A date in the format MMDDYY would be MDY. \| |
| **'Tip' Values** | ***(Numeric Only, Query+, Drop Query and Classic Query with Sort by Column Option)***<br>***(Optional)*** Tip values to be displayed when the mouse is placed over the column heading. Values include *Total*, Average, *Minimum* and *Maximum*.<br>Column tips are also supported in Webster+ queries. See Webster+ **[query=xxx](https://manual.pvxplus.com/webster/short-code-options#query)**.<br>*(Webster+ support for column tips was added in PxPlus 2024.)* |
| **Hotlink Logic** | ***(Query+ and Drop Query)***<br>Logic to execute when the column is double clicked. Click the drop-down arrow for a list of event actions: *Ignore, Link, Call* and *Execute*. See **[Actions and Parameters](https://manual.pvxplus.com/nomads-graphical-application/program-interaction/events-logic/actions-and-parameters)**.<br>The specified logic overrides selecting the query record. Columns with a hotlink are displayed in the color defined by the **'OPTION'("StdLvueHotlinkClr",color$)** setting and are underlined while hovering over the column. See **[OPTION](https://manual.pvxplus.com/mnemonics/option#hotlinkclr)** mnemonic.<br>\|  \|  \|<br>\| --- \| --- \|<br>\| *Webster Hotlink* \| Specify a hotlink for the column to be used in a **[Webster+](https://manual.pvxplus.com/webster/webster)** environment. Links may specify URLs, pages or events, starting with *http://*, *https://*, *page:* or *event:.* Additional URL parameters can follow the page/program name separated by an **&** *(ampersand)*; e.g. &*fieldname$*=.<br>***Example:***<br>*page*:*pagename*&*fieldname$*=$1<br>The Webster+ hotlink is translated into a Webster+ **[\[link\]](https://manual.pvxplus.com/webster/short-codes#link)** short code:<br>\[link *page*:*pagename*&*fieldname$*=$1\]<br>This results in a hyperlink to the specified page name with *fieldname$* as the variable to be passed to the page/program and $1 being substituted with the value in the column. \|<br>\| *Target* \| ***(Optional)*** Specify a Webster+ target browser window where the results of a link or event will be displayed. Selections are null ***(Default)***, *Same*, *New* or *Popup*.<br>*Same*<br>To have the output replace the current page.<br>*New*<br>To create a new tab/window.<br>*Popup*<br>To create a popup overlaid window. When selected, an input control with a **%** (*percent sign*) is displayed for entering the percentage of the screen the popup window will occupy. \|<br>*(The Hotlink Logic option was added in PxPlus 2018.)  <br>(The Webster Hotlink option was added in PxPlus 2021 Update 1.)* |
| **Query** | ***(Classic Query Only)***<br>Optional sub-query assigned to the column.<br>\|  \|  \|<br>\| --- \| --- \|<br>\| *Library* \| Select a library name from the drop-down list, click the Browse button to look through the directory structure to find the library or type the library path. An expression can also be entered by preceding the expression with an **=** *(equals sign)*; e.g. *=libname$* or *="mylib.en"*.<br>Note:  <br>The Library name may be a specific or generic reference. See [Cascading Language Suffixes](https://manual.pvxplus.com/nomads-graphical-application/multilingual-capabilities/cascading-language-suffixes/overview). \|<br>\| *Panel* \| Identify the query object to be used as a sub-query by selecting it from the drop-down list of available query panel names. \|<br>At run time, users can invoke the sub-query by highlighting the column title and clicking the enabled query button on the toolbar. The current contents of the query column are passed as the *Start At Value* for the sub-query.<br>*(Support for entering an expression for a Library name was added in PxPlus 2019.)* |
| *Initially Hide Column* | Select this option to initially hide the column at run time until the user selects it to be shown.<br>When using ***Query+*** *Toolbar, Hybrid, Menu* or *Drop Query* views (see **[Query View](https://manual.pvxplus.com/nomads-graphical-application/dictionary-based-development/query-subsystem/query-header#queryview)** option), columns can be set to be initially hidden or shown by clicking the **[Test/Design](https://manual.pvxplus.com/nomads-graphical-application/dictionary-based-development/query-subsystem/query-definition#testdesign)** toolbar button to display the query and selecting the *Show/Hide/Reorder Columns* item from the **[Columns](https://manual.pvxplus.com/nomads-graphical-application/dictionary-based-development/query-subsystem/run-time-query#columns)** run-time option to set the visibility. Click the *Save + Exit* button to save and incorporate these settings into the query definition when exiting the query.<br>*(The ability to save query changes when in Test/Design mode was added in PxPlus 2023 Update 1.)* |
| *Security* | Launches the **[Object Security Definition](https://manual.pvxplus.com/nomads-graphical-application/system-maintenance-tools/security-manager/restricting-access#objectsecurity)** window for setting up column level security for the query. See **[Query Security](https://manual.pvxplus.com/nomads-graphical-application/dictionary-based-development/query-subsystem/query-security)**.<br>*(The Security button was added in PxPlus 2021.)* |

## See Also

**[Query Definition](https://manual.pvxplus.com/nomads-graphical-application/dictionary-based-development/query-subsystem/query-definition)**
