multiSelect is displayed to a user as a dropdown
list. The user can select multiple items from the list.

A
multiSelect field allows a user to select zero, one, or more values. To force
a user to select only one value at most, use the enum template
field.Create a multiSelect field
A multiSelect field can be added to a metadata template either when creating
a metadata template, or when updating a
template with the addField operation.
The required attributes for a multiSelect field are a type, a displayName,
a key, and a list of options.
description can be provided that is shown to a user in the UI,
and the field can be set to hidden to hide it from users in the web and mobile
apps.
Update a multiSelect field
A multiSelect template field can be updated by updating the
template it belongs to. Updates to templates happen through
operations to ensure that any template that is already assigned to a file or
folder is updated as well.
Change basic field values
When updating amultiSelect metadata field, one of the possible operations is
the editField operation, which can be used to change the field’s key,
displayName, description, and hidden values.
The
fieldKey here represents the original key of the field to change. The
data.key field is the new key of the field.Add an option
Adding an option to amultiSelect field can be achieved through the
addMultiSelectOption operation. The operation expects the fieldKey to be set
to the key of the multiSelect field to change, and a data object with the
key of the new option to add.
Reorder options
Reordering the options in amultiSelect field can be achieved through the
reorderMultiSelectOptions operation. The operation expects the fieldKey to
be set to the key of the multiSelect field to change, and a
multiSelectOptionKeys array with the keys of the options in order.
Edit an option
Editing an option of amultiSelect field can be achieved through the
editMultiSelectOption operation. The operation expects the fieldKey to be
set to the key of the multiSelect field to change, and a
multiSelectOptionKey to be set to the key of the field option. Finally, it
expects a data object with the new key of the field option.
Remove an option
Removing an option from amultiSelect field can be achieved through the
removeMultiSelectOption operation. The operation expects the fieldKey to be set
to the key of the multiSelect field to change, and a multiSelectOptionKey
to be set to the key of the field option to remove.
