Designing Screens - Working with Multi-Select
A Multi-select in a screen typically refers to a user interface element that allows users to select multiple options from a predefined list. It is a form of input control that presents users with a list of choices, and they can choose more than one option. The use of multi-picklists is common in various software applications, especially in settings where users need to express preferences, choose from multiple categories, or assign multiple attributes to a particular item. The variable value that this component produces when the form is submitted is a Collection of Strings, with every String being the value of a selected option's value
attribute.
Use case of Multi-select is varied:
In a default template, there is multi selection of attachments from a library, where users can select which PDF documents to merge with the generated document
Select multiple products to display in the document
Select contacts to send email or to sign the document
How to add Multi-select component to screen
Place the cursor to where the Multi-select component should be
Choose Multi-select from the left panel
A multi-select will appear with 2 columns and
Add
,Remove
,Up
andDown
buttons
![image-20240204-051024.png](../__attachments/171999264/image-20240204-051024.png?inst-v=5205e5d1-dc16-46d7-af02-1258d99cc136)
How to configure Multi-select element
Select Multi Select from the bread crumb to configure its variable name. For example, ‘selectedItems
' has been defined for this Multi Selct element. Later, when users select any items from the left column move it to the right column, its value will be entered as an attribute to 'selectedItems
'
![image-20240204-051834.png](../__attachments/171999264/image-20240204-051834.png?inst-v=5205e5d1-dc16-46d7-af02-1258d99cc136)
How to configure Options in a Multi-select
Populating option to a Multi select can be set by choosing Option from Tree view (1) or by selecting the first empty line in the left column (2).
![image-20240204-052449.png](../__attachments/171999264/image-20240204-052449.png?inst-v=5205e5d1-dc16-46d7-af02-1258d99cc136)
Option element configuration view
The same method to dynamically populate content for the options can also be applied here using Content
, Repeat
, Repear: Variable
, and Value
in the Content Commands section. For manual created options in screen, the Attributes can be used to create items.
For example, a related list of Contacts to an Account has been retrieved from Salesforce as a contacts
collection as below:
contacts | Name | Id |
---|---|---|
contact1 | John Doe | 00123CONTACT001 |
contact2 | Ava Max | 00123CONTACT002 |
Content: dynamic content to replace the Label attribute
Repeat: entered value should be a collection which needs to be iterated
Repeat Variable: name to indicate each item within this collection
Value: dynamic content to be the value of the selected items, which will then be entered as String into ‘
selectedItems
' which has been predefined in the previous example.
![image-20240204-053146.png](../__attachments/171999264/image-20240204-053146.png?inst-v=5205e5d1-dc16-46d7-af02-1258d99cc136)
The resolved screen with contact’s name populate in the Available column for users to select.
![image-20240204-054159.png](../__attachments/171999264/image-20240204-054159.png?inst-v=5205e5d1-dc16-46d7-af02-1258d99cc136)
If both options are selected, the resolved value of ‘selectedItems’ will be a string list of Ids ["00123CONTACT002","00123CONTACT001"]
![image-20240204-054428.png](../__attachments/171999264/image-20240204-054428.png?inst-v=5205e5d1-dc16-46d7-af02-1258d99cc136)