Skip to main content

I'm building a connection on the Zapier platform, and I am trying to make a static dropdown with key-value pairs as per https://platform.zapier.com/docs/input-designer#keyvalue. It is not working

1. The simple example of ["one", "two","three"] does work, but the key-value pair example on that page does not work, even without the suspicious backticks. This is the example: [ '{ “sample”: “1”, “value”: “1”, “label”: “Pork” }, { “sample”: “2”, “value”: “2”, “label”: “Fish” } ]`

2. I'm not sure if the "sample" in the example is required and what purpose it serves.

Thanks in advance!

Charles


Hi @Charles_CBCPL

The static dropdown can be declared with 2 methods:

  1. Using an array of values like you've shown in the first example.
  2. Or using an object where the keys are the actual "values" and the values are considered "labels".

For example:

{

"1": "Pork",

"2": "Fish"

}

I'm not sure about the other way you mentioned because I haven't used it before.



I appreciate your help, but your example isn't working either. I input it as in screenshot 1, then save it and I get a confirmation, but when I check again, it's gone as in screenshot 2. Thanks.

Screenshot 1

form-editor.PNGScreenshot 2

form-editor2.PNG



@ikbelkirasan do you have any other ideas around this? If not, we're happy to escalate this one to our developer team. Let us know!



@jesse it should work the way I described (see the screenshot below).

image.png

@Charles_CBCPL - If you look closely, you'll find a comma there which makes the JSON invalid, that's why you see the red cross mark. Remove it and it should work as you can see above.

image.png



@ikbelkirasan. It’s the little things sometimes… Thanks for pointing out my error. Everything is working as it should.


@Charles_CBCPL Awesome, glad it worked! :)