Skip to main content
Best answer

Creating a static dropdown with Zapier CLI

  • 11 May 2022
  • 2 replies
  • 284 views

Hi,

How would I go about creating a static dropdown using the Zapier CLI?

I have this:

{

key: 'process_type',

required: true,

choices: ["A",”B”, “C”],

}

But I want test1 to be assigned to process_type when I choose A, test2 to process_type when choosing B and so on. 

 

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

2 replies

Userlevel 7
Badge +12

Hi @vinshet 

You can find all docs on the field choices with label schema here: https://github.com/zapier/zapier-platform/blob/master/packages/schema/docs/build/schema.md#fieldchoicewithlabelschema 

choices: [{ label: 'A', sample: 'test1', value: 'test1' },{ label: 'B', sample: 'test2', value: 'test2' },...]

Userlevel 7
Badge +12

Hi @vinshet - The easiest way to define such a field is to turn the choices into an object where the value (like test1..) is defined in the key and the label (like A, B...) is defined in the value.

For example:

{
"key": "process_type",
"required": true,
"choices": {
"test1": "A",
"test2": "B",
"test3": "C"
}
}