Skip to main content

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. 

 

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"
}
}

 


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: e{ label: 'A', sample: 'test1', value: 'test1' },{ label: 'B', sample: 'test2', value: 'test2' },...]