Picklist Field

Adding component

Basic properties

Components Basic Properties

Picklist View Types

Along with the single list view one can display picklist as radio buttons control.

Click component on the form and select view type:

Single list view type as it is shown in form renderer:

"Radio" view type as it is shown in form renderer:

Picklist Dynamic Options (for Virtual Fields Only)

For situations when data need to be added to a picklist dynamically one is to use ‘Dynamic options’ setting (2).

Options are to be passed as a semicolon separated values or JSON.

Below are examples of caseType variable setup used to store dynamic picklist options:

Passing semicolon separated options:

Above variable will store case types labels separated with semicolon. Result string will look like following:

Mechanical;Electrical;Structural;Other;Issue;Question;Idea

NOTE: When using semicolon separated values final picklist options keys will be same as options values.

Passing JSON allows one to create picklist with labels different from values.

Available starting 2.16 release.

Above setup will result JSON string storing case types as a key:value pairs where key is case type label and value is first 3 characters of the label.

Result string will look like following:

{"Mechanical":"Mec","Electrical":"Ele","Structural":"Str","Other":"Oth","Issue":"Iss","Question":"Que","Idea":"Ide"}

NOTE: JSON has to store object with "key":"value" pairs where "key" is option label and "value" is option value:

{"key":"value", "key1":"value1", ... }

To use variable as a source for dynamic picklist simply add it to 'Options' input:

To learn more about working with variables please refer following article: Variables

Virtual picklist default value

Choose one of the existing options as a default one:

For dynamic picklist fill default value with required option value:

One can use merged field to pass default value to picklist.

Picklist option groups

Option Groups feature provides user with an ability to show specified options in picklist component based on conditions.

Object-determined Option Groups

These Option Groups are not shown in the From Builder. It is a standard Salesforce feature that allows to configure available options depending on Record Type of the object record.

To turn them on check "Use Standard Field Dependencies" checkbox on the field properties:

These Option Groups are configured by administrator in the proper Object Settings:

Setup -> Object Manager -> Some Object -> Record Types - >Some Record Type -> "Picklists Available for Editing" section -> click "Edit" on necessary Picklist field:

Select options available for that Record Type:

Standard Option Groups

Available only when 'Dynamic options' setting is set to false

Click picklist on a canvas and click "Add Group" button (3) in Option Groups section:

Check options to be displayed in picklist (4), add Conditions (5) and click "Save changes" button (6):

Above conditions will be satisfied for Stub records with Record Type = "Type 1"; these records will only have "Last Value" and "Two Value" options for the "Picklist" field on the form. All other stub records will have all 4 options displayed there.

User can have multiple option groups set up for a single picklist component.

Events: Form Input Events

Conditional styles

Last updated