Complex Input Controls
You can use attributes to configure complex input controls, such as drop-down lists and lookup controls.
Drop-Down Lists
You can use the following attributes to configure a drop-down list that represents a data access class (DAC) field in the user interface:
- PXStringList: Configures a drop-down list from which a user can select from a fixed set of strings.
- PXIntList: Configures a drop-down list where a user can select from a fixed set of values. The control displays strings, while the field is assigned the integer value corresponding to the selected string.
- PXDecimalList: Configures a drop-down list where a user can select from a fixed set of strings converted to decimal values.
- PXImagesList: Configures a drop-down list where a user can select from a fixed set of images.
- PXDBIntList: Configures a drop-down control for an integer field. The values and labels for the drop-down control are retrieved from the specified database table.
- PXDBStringList: Configures a drop-down control for a string field. The values and labels for the drop-down control are retrieved from the specified database table.
Lookup Controls
You can use the following attributes to configure a lookup control that represents a field in the user interface:
- PXSelector: Defines a lookup control for a DAC field that references a data record from a particular table by holding its key.
- PXCustomSelector: Serves as the base class to derive custom attributes used to configure lookup controls.
- PXRestrictor: Adds a restriction to a BQL command that selects data for a lookup control, and displays an error message when the value entered does not fit the restriction. The attribute works only with PXSelector and cannot be used with PXCustomSelector.
Segmented Key Controls
A segmented key value is a string value that identifies a data record in the system and consists of one segment or multiple segments. A segmented key is an entity that is identified by a string (referred to as a dimension) and associated with segments. For each segment, you can define the list of possible values. You can create a new segment when the data records identified by the segmented key already exist in the database.
You can use the following attributes to configure a control to input a segmented key value in the user interface:
- PXDimension: Defines an input control that formats the input as a segmented key value and displays the list of allowed values for each key segment.
- PXDimensionSelector: Defines an input control that combines the functionality of the PXDimenstion attribute and the PXSelector attribute. A user can view the data set defined by the attribute and select a data record from this data set to assign its segmented key value to the field or to replace it with the surrogate key.
- PXDimensionWildcard: Behaves similarly to the PXDimensionSelector attribute, but also allows the ? character to be treated as a wildcard.