Multi-Select Field

Adding component

Basic properties

Drawing

Single List view type allows user to choose multiple options holding CTRL (Windows) or Command (macOS) key:

Drawing

To choose options from the Dual List one has to select items in left column and move them to the right (or vice versa) using arrow icons :

Drawing

Checkboxes view type represents select options as a checkboxes list:

Drawing

Both Single List and Dual List view options have "Size" setting which is used when list height should be fixed. On screenshots below "Size" is set to 4. It means that multi picklist component height is fixed to display 4 rows only.

Object field:

Drawing

Virtual field:

Drawing

Multi-select Dynamic Options (for Virtual Fields Only)

For situations when data need to be added to a multi-select dynamically one is to use "Dynamic options" setting:

Drawing

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

Below are examples of caseType variable setup used to store dynamic multi-select options:

Passing semicolon separated options:

Drawing

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 multi-select options keys will be same as options values.

Passing JSON allows user to create multi-select options with labels different from values:

Drawing

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 multi-select simply add it to "Options" input (7):

Drawing

Virtual multi-select default value

User can provide default values separated by semicolon (see below):

Drawing

For multiselect using JSON to build dynamic options one is to pass default option values (not labels) separated by semicolon (see below):

Drawing
Drawing

Multi-select option groups

Option Groups feature provides user with an ability to show specified options in multi-select 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:

Drawing

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

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

Drawing

Select options available for that Record Type:

Drawing

Standard Option Groups

Available only when "Dynamic options" are turned off (unchecked)

Select Input Multi Select on a canvas and click "Add Group" button under Option groups:

Drawing

Popup will be shown. Check options to be displayed in multi-select (10), add conditions (11) and click "Save changes" button (12):

Drawing

Above rule will be satisfied for "Stub" Object record with type = "Type 1"; those stub records will only have "One Value" and "Two Value" options displayed for selection. All other stubs will have all 7 options displayed in multi-select component.

User can have multiple option groups set up for a single multi-select component. This is very useful for different conditions.

E.g.:

  • there is a "Country" picklist with country options (US, Canada)

  • there is a multi field with checkboxes that represent some states/provinces of both these countries (California, Ohio, Oklahoma, Ontario, Quebec)

  • multi has 2 option groups:

    • California, Ohio, Oklahoma with conditions set to "Country = US"

    • Ontario, Quebec with conditions set to "Country = Canada"

  • when user selects "US" in picklist, US states will be shown; when user selects "Canada" - canadian provinces.

Events: Form Input Events

Conditional styles

Last updated