Specifying a data source directly in a property
Make the development process more convenient by defining the source of data for a control directly in a property that populates the control with values at run time. For example, you can configure a drop-down menu to display the contract type property.
Apply this configuration to picker controls, which include the following controls:- Autocomplete field
- Multiselect list
- Check box
- Drop-down menu
- Radio button
- Slider
- Anypicker control
In the navigation pane of Dev Studio, click Records.
Expand the Data Model category, and then click Property.
In the list of available properties, select and open the property that you want to edit.
In the Edit Property configuration form of your property, on the General tab, edit the Data access section that displays options based on the property mode.
For all the property modes, except for Page and PageList, select one of the following options:
Choices Actions Users provide data manually at run time Select Manual. Property retrieves data via a linked property, A linked property is a special form of property that holds the value of a key to an operator ID, organization, access group, or other data object that presents data from that object anywhere in the system
Select Automatic reference to class instance (linked).
In the Linked Class field, select a class that contains the linked property.
In the Linked Mapping section, in the Source Property field, select the linked property name.
For the Page and PageList property modes, select one of the following options:
Choices Actions Users provide data manually at run time Select Manual. Property refers to a data page (the property values are refreshed every time the data page is refreshed) Select Refer to a data page.
For PageList mode, to retrieve each embedded page in the PageList separately, select the Load each page in this page list individually check box.
In the Data Page field, enter a data page that stores values to refer.
Property copies data from a data page (the property values are not refreshed when the data page is refreshed) Select Copy data from a data page.
For PageList mode, to retrieve each embedded page in the PageList separately, select the Load each page in this page list individually check box.
In the Data Page field, enter a data page that stores values to copy.
To copy only selected information from the data page, in the Optional Data Mapping field, enter a data transform that determines what information the system copies.
In the Display and validate section, in the UI control list, select a picker control to display the values of the property at run time.
To configure a custom control with parameters, such as the pxOperatorImage custom control, select the Parameters link that is displayed below the UI control list.
In the Table type field, restrict the value that a property can have at run time by completing one of the following settings:
Choices Actions No values populate in the property field Select None. For example,you can choose that setting when you want to use the property with a Text input control.
The property value is limited to a small number of values in a single language Select Local list.
In the Table values section, manually add the set of acceptable values to display or enter in the picker control at run time.
The set of valid values contains more than a few hundred values or the values are expected to change frequently, and the values are available at run time within the keys of field value rules Select Field value.
In the Field Value description section, in the Class list, select a class that is the first key part (Applies To class) of one or more field value rules.
The class that is specified here need not match the Applies To key part of this property.In the Field name list, enter the second key, which is the FieldName parameter of the field values that have the specified class as their first key part.
The set of acceptable values is defined by using the keys of a particular class (other than the Applies To class of the property) Select Class Key Value.
In the Table description section, in the Validation class list, select a concrete class that stores the set of acceptable values.
If the validation class has more than one key, in the Subset name field, enter the value of the key in the validation class that represents the subset that contains the list of acceptable values.
The set of valid values contains more than a few hundred values or the values are expected to change frequently, and the values are available at run time as the keys of a certain known class Select Remote list.
In the Class of instance list, select a class of the instance.
In the Reference to list or group list, select a property that has one of the List or Group modes, that is: value list, value group, page list, or page group.
If you select a Page list or Page group property in the Reference to list or group, in the Reference in each to scalar property list, identify a property that contains the value that is an index that identifies the specific page that contains the list.
Leave the Reference to localized value field blank.
In the Keys of instance section, add a key by clicking the Add a row icon.
In the Key field field, enter the name of the property that is a key of the class.
In the Value field, enter the value for the key of the instance.
The actual values that are stored in the clipboard are different from the values presented to the user at run time
Select Prompt list.
In the Prompt values section, add a prompt by clicking the Add a row icon.
In the Standard value field, enter a value.
The system stores this value internally as the property value.In the Prompt value field, specify the value that is visible in the UI at run time.
The set of acceptable values is defined in a data page Select Data page.
In the Class of instance list, select the class of the data page instance.
In the Data page list, select a data page.
In the Property for value list, select the values to be the source for the property values.
In the Property for display text list, select the value that you want to display as the label for the property values.
If the selected table type is field value, data page, class key value, remote list, or prompt list, decide whether to use the property values for display only, or for display and validation:
- To specify that you can use the values only for display and for localization, select the Display only (not for validation) check box.
- To specify that you can use the values not only for display and localization, but also for validation, clear the Display only (not for validation) check box.
In the property form, click Save.
Previous topic Specifying a data source in a control Next topic Adding a multistep form to a stage