Question

Dynamic field with multiple select option.

  • 8 December 2022
  • 1 reply
  • 269 views

I want to display in  zapier Action dynamic field tag list , So User can select multiple tag from tag list.
Right now user can select only one tag.
My code is as below: 
 return z.request(options)
    .then((response) => {
      response.throwForStatus();
      const result = z.JSON.parse(response.content);
      results=result.data;
     // z.console.log(results)
      const field = { key: 'tag_id',label:'Tag List',choices: results.map(item => {
  return {
    value: item.tag,
    label: item.id,
    
  }
}) }
      return field;
    });


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

1 reply

Userlevel 6
Badge +8

Hi @makedreamsatul!

The best way to do this is to provide each tag as its own field and let the user select as few or as many as they want in the user interface, then, before sending them to the API, if the API requires them to be the same field, you can collect them into, say, a comma-separated list before sending them as one field to the API.

Hope that helps!