# Custom User Files

> Source: https://manual.pvxplus.com/nomads-graphical-application/customizer/custom-user-files

Custom user files are not standard application files; they are defined by the users. Users define the fields in the file, which may be updated within the *Custom Information* grid. These user files are not restricted to individual panel definitions. They can be accessed by multiple panel definitions. They can also be defined as *Personal* or *Public* where public user files can only be created by those with ADMIN or CUSTOMIZER security classifications. See **[Security Considerations](https://manual.pvxplus.com/nomads-graphical-application/customizer/security-considerations)**. Security restrictions may be placed at the file level, as well as on individual file elements.

User files can be defined by invoking the **[Customize](https://manual.pvxplus.com/nomads-graphical-application/customizer/working-with-custom-information#customize)** window for a specific panel or by launching **[Customizer General Maintenance](https://manual.pvxplus.com/nomads-graphical-application/customizer/working-with-custom-information#custom_gen_maint)**. Using the **Customize** window allows you to define personal user files (you can also define public user files if you possess *Administrator* access). Using **Customizer General Maintenance** allows you to define public user files (you can also define personal user files for any user by entering their specific *User ID)*.

## Creating and Modifying Custom User Files

To create or remove a user file definition or update its properties, select the **User Files** tab on the **[Customize](https://manual.pvxplus.com/nomads-graphical-application/customizer/working-with-custom-information#customize)** or **[Customizer General Maintenance](https://manual.pvxplus.com/nomads-graphical-application/customizer/working-with-custom-information#custom_gen_maint)** windows. (Existing properties may not be altered if a user file is currently in use.)

The **User Files** tab presents the following:

|  |  |  |
| --- | --- | --- |
|  | *Add* | Launches the **[Define a User File](https://manual.pvxplus.com/nomads-graphical-application/customizer/custom-user-files#Mark1)** window for creating a new user file. |
|  | *Remove* | Deletes the selected user file. |
|  | *Properties* | Launches the **[Define a User File](https://manual.pvxplus.com/nomads-graphical-application/customizer/custom-user-files#Mark1)** window for editing the current properties of an existing user file. |

In **Customizer General Maintenance**, the **User Files** tab presents two additional buttons:

|  |  |  |
| --- | --- | --- |
|  | *View Contents* | Launches a separate window for viewing the record contents of a selected user file. |
|  | *Change Contents* | Launches the PxPlus **[File Update Utility](https://manual.pvxplus.com/file-update-utility)** that allows you to browse a selected user file, as well as update and delete individual records. |

## Define a User File

To define a ***new*** User File, click the *Add* button on the **User Files** tab to display the **Define a User File** window. To edit an ***existing*** User File that has been selected, click the *Properties* button.

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

This window consists of the following:

|  |  |
| --- | --- |
| *Descriptive File Name* | Enter a descriptive file name to identify the new file. |
| *Physical File Name* | When a *Descriptive File Name* for the new file is entered, a default physical file name is generated automatically. This file name can be overridden by entering your own simple file name.<br>By default, user files are created in the *Custom* directory, which is located in the same directory as the PxPlus executable or where the *Lib* directory is kept (on a Vista system). This can be overridden by preloading an alternate directory path into the **[%NOMAD_Custom_Dir$](https://manual.pvxplus.com/nomads-graphical-application/appendix/nomads-variables/overview#customdir)** global variable. |
| **Define File Items** | Displays a list of the individual file items (or fields) defined for the user file. |
| *Add* | Launches the **Define File Item** window for creating a new file item.<br>![](https://manual.pvxplus.com/migration-assets/0c29b006b847bcaef845f8b813fd19d1c66e89b98a1243d2ec57a34054957c26.jpg)<br>This window consists of the following:<br>\|  \|  \|<br>\| --- \| --- \|<br>\| *Item Identifier* \| Code name used to identify the data item. \|<br>\| *Description* \| Enter the text to appear as a label in the *Custom Information* grid. \|<br>\| **Data Type** \| Select whether the information is *Text* or *Calculation (Numeric)*. \|<br>\| *Length* \| Maximum length of the data. \|<br>\| *Display Format* \| ***(Optional)*** Displays the formatting that was entered or selected using the *Define* button. Formatting for numeric data includes currency symbols, thousands separators, signs, etc. Formatting for text data, such as dates, includes dashes, slashes, etc. \|<br>\| *Define* \| Launches a separate **Numeric Format** or **Text Format** window for defining a numeric or text display format, depending on the **Data Type** selected. \|<br>\| *Input Type* \| Select one of the following:<br>*Input Box*<br>Normal text cell containing one line of data.<br>*Input Box with Ellipsis*<br>Normal text cell that will show "…" if the text exceeds the displayable area.<br>*Multi_line Input*<br>Normal text cell that can contain multiple lines of text.<br>*Check Box*<br>Recessed check box (Unchecked = "0", Checked = "1").<br>*Check Mark*<br>Recessed check mark (Unchecked = "0", Checked = "1").<br>*Drop Box*<br>Text cell that allows the user to make a selection from a drop-down list.<br>*Hidden Drop Box*<br>Same as the *Drop Box*, but the drop-down button is shown only when focus is on the cell.<br>*Variable Drop Box*<br>Same as the *Drop Box*, but the user may also make a selection by keying in information not included in the drop box selection. \|<br>\| *Control Text* \| Add text labels for *Check Box* and *Check Mark* input types by entering them as control text. Item lists for the various Drop Boxes must be entered into the control text, one item per line. \|<br>\| *Security* \| Click this button to assign security levels to individual elements of public user files. If the system detects that the NOMADS security classification file does not exist, a message will display. See **[Setting Up Security Classifications](https://manual.pvxplus.com/nomads-graphical-application/system-maintenance-tools/security-manager/defining-classifications#Mark1)**. \| |
| *Remove* | Deletes the selected file item. |
| *Properties* | Launches the **Define File Item** window for editing the selected file item. |
| *Move Up  <br>Move Down* | Changes the order of the items in the **Define File Items** list. |

Keys to access user file records are not defined at this time. Instead, they are defined for individual panels when user items are selected for display. This is because the name of the key component fields may differ from panel to panel. Keys have a maximum of 127 characters.

## User File Data

Besides being displayed in a *Custom Information* grid on a NOMADS panel, you may want to access user file data in other ways, such as for reporting, etc. User files and their elements are defined in the user definition files, *providex.udf* and *providex.ude*. While the file definitions contained within these files are ***not*** accessible to PxPlus **[Data Dictionary Utilities](https://manual.pvxplus.com/data-dictionary/data-dictionary-utilities/overview)** or directly to the **[PxPlus SQL ODBC Driver](https://manual.pvxplus.com/odbc/pxplus-odbc)**, the definitions within these files are used to embed the data dictionaries into the user files, which allow them to be accessed in other ways.

User files are standard PxPlus VLR files with embedded dictionaries. See **[Layout of a User File](https://manual.pvxplus.com/nomads-graphical-application/customizer/file-definitions#layout_user)**. As such, they can be accessed using standard PxPlus file I/O directives and functions. In addition, because the files contain an embedded dictionary, they can be used directly by the PxPlus **[Views System](https://manual.pvxplus.com/views-system/introduction)** and the PxPlus **[Report Writer](https://manual.pvxplus.com/report-writer/introduction)**.

User files can be used to define data sources within the PxPlus **[Views System](https://manual.pvxplus.com/views-system/introduction)**. The data source definition must use the physical file name to define the source. Relationships may also be set up with other data sources based on the key definition of the user file. A View based on such a relationship could create a dataset where data from the user file would be included with data from application files.

***Example:***

A user file is created with two fields to hold additional client information. These fields have been added as custom information to the Client Maintenance panel, keyed on the client ID (the key for the client file). Within the Views system, you can use Data Source Maintenance to create a data source for the user file based on physical path, and another data source for the application client file. Within the client data source definition, set up a relationship linking the user file data source, based on client ID. Based on the client data source, you can now derive View definitions using Views Maintenance that will include the additional fields from the user file.

Once defined within the context of a View, the user file data becomes available to the **[PxPlus SQL ODBC Driver](https://manual.pvxplus.com/odbc/pxplus-odbc)**. The Views are also available to provide a source of data to the PxPlus **[Report Writer](https://manual.pvxplus.com/report-writer/introduction)**.
