Parameters for the cx-picker Fragment
This topic lists the parameters that you can set for the cx-picker fragment. To learn how to set parameters for this fragment, see Configure the Picker.
Parameter |
Sample Value |
Description |
---|---|---|
dynamicLayoutContext |
|
This parameter is set by default and you don't have to change it if the field displays on a create or edit page. If this field doesn't display on a create or edit page, but rather on a mass update page for example, then you can remove the default value in this parameter. |
pickerLayoutId |
|
This parameter points to the rule set whose layout controls how the picker looks at runtime. The default value, which you don't have to change, is
If you need to create a custom rule set, then create the rule set as a dynamic table and ensure that the values for the Label and ID fields are identical. Then add the rule set's ID to this parameter. |
resource |
|
Use this parameter to pass the target object name and end point:
Optionally pass these additional attributes:
Be sure to update the resource parameter with
the appropriate values for your use case. For example, replace
|
Parameter |
Sample Value |
Description |
---|---|---|
context |
To display one field vs. another, set the
context parameter to For example: To allow users to enter text values into this field, add this
property to the context parameter: |
You can use the context parameter to control picker behavior. For example:
|
createConfig |
|
Indicates if the user can create a record directly from the picker.
Specify If no value is set, then the "create a record" option is automatically displayed in the picker by default. |
isDefaultSavedSearchEnabled |
This parameter is a check box. |
Use this parameter to indicate the default saved search that's automatically applied to the list of values in the picker field. The check box is not selected, by default.
Note: This parameter is applicable only for objects that are
supported by Adaptive Search.
|
label |
|
Use this parameter to override the field name on the UI. This parameter is particularly useful if a filter is defined on the dynamic choice list field in Application Composer or if you pass filter criteria using the query parameter (described below). For example, if you add a simple filter to the dynamic choice list
field to display only accounts in the US, then you can use the
label parameter to change the field name.
In this example, you might want to change the Account field name to
a new field name, |
pickerNameField |
|
Use this parameter in conjunction with the
context parameter to support user-entered
text in the picker field. Bind this parameter to a virtual field
that you create, such as If this field has a simple filter (from Application Composer) or a value in the query parameter, then any value in the pickerNameField parameter is ignored. |
query |
|
Use this parameter to filter the records that are available in the picker at runtime. For example, you could filter the records to display only accounts
with a specific keyword in the name, such as
The value for this parameter should be an array[object]. If you have both a simple filter on the dynamic choice list field (from Application Composer) and also a query in this parameter, then this parameter takes precedence. If you pass a value in this parameter, then the list of saved searches won't display in the picker at runtime. |
readonly |
This parameter is a check box. |
Use this parameter to make the field read only. For example, you might want to make the field editable only when users first create a record. During edit, however, you might want this field to be read only. |
required |
This parameter is a check box. |
This parameter is applicable only when there is no value in the dynamicLayoutContext parameter. Use this parameter to make the picker field required. If the dynamicLayoutContext parameter does contain a value, however, then you can make the picker field required by selecting the Required check box on the Fields tab. For example: . |
selectedRow |
|
Use this parameter in conjunction with the value parameter to make use of other field values from the selected row in the picker. For example, if the user picks a contact, then the contactId is stored in the value parameter that's bound to the picker. But, the user can also retrieve the contact's email address using this parameter.
|
sortCriteria |
For example, |
Use this parameter to override the default sort criteria in the picker layout. If the user selects a saved search, then the sort criteria comes from this parameter, if provided. If not provided, then the picker honors the sort criteria defined in the saved search. If not defined, then the picker sorts values based on the first column in the picker layout. If there is a simple filter on the field or if a filter is defined in the query parameter, or if the user selects Related Records, then the sort criteria comes from this parameter, if provided. If not provided, then the picker sorts values based on the first column in the picker layout. |
value |
|
Use this parameter to store the value selected in the picker field, when there is no value in the dynamicLayoutContext parameter. For example, let's say a contact picker is on a page doesn't have a dynamic layout. If the user picks a contact, then the contactId is stored in the value parameter that's bound to the picker. |