Company logo
June 22, 2021

Create new option for list arguments

Vinay Ayyala's avatar

By popular demand, we are adding a new setting for commands with list arguments: "create or select". Users can now create a new option or select an existing one.

Imagine you have a command Add label. Users used to only be able to select from their current labels. Now you can also give them the option to add a new label (while using it in the command).

How can I turn this on? 🛠

You can enable this option from a list argument's advanced settings.

If the setting is enabled and the user creates a new option through CommandBar, CommandBar will provide the following to your callback:

{key: { value: <value provided by user>, _createdByCommandBar: true, }}