The dropdown column lets a user select one or more options from a selection.

Check out our help center to learn more about the dropdown column.

Reading the dropdown column

You can return the data in a dropdown column in two different formats. The text field will return the data as a simple string, and the value field will return the data as a JSON string.

Here is an example payload showing both fields:

{
  "text": "Urgent",
  "value": "{\"ids\":[1]}"
}

Updating the dropdown column

You can update a dropdown column with a simple string value or a JSON string value.

❗️

NOTE

It is not possible to mix dropdown labels (the text values) with dropdown IDs in the string values.

Simple strings

To update a dropdown column with strings, send the IDs of the labels you want to set. If you don’t know the IDs of the labels you’re trying to set, you can send the label's text value instead.

If you make an API call to update the dropdown column value, but the label doesn't exist, the expected behavior will be an error message. In the output of that error, you will also receive the existing labels for that specific column.

You can use create_labels_if_missing: true in your query. Then, the labels you send that didn't exist previously will be created.

You can send a list of IDs or labels, separated by commas (',').

For example: "dropdown_label_1, dropdown_label_2".

Code examples using dropdown ID values

Here is a sample query you can use to update the dropdown column using simple string values via dropdown IDs:

mutation {
  change_simple_column_value (item_id: 1297498726, board_id: 1297498717, column_id:"dropdown", value: "1,2") {
    id
  }
}
fetch ("https://api.monday.com/v2", {
  method: 'post',
  headers: {
    'Content-Type': 'application/json',
    'Authorization' : 'YOUR_API_KEY'
  },
  body: JSON.stringify({
    query : "mutation ($myBoardId:Int!, $myItemId:Int!, $myColumnValue: String!, $columnId: String!) { change_simple_column_value (item_id:$myItemId, board_id:$myBoardId, column_id: $columnId, value: $myColumnValue) { id } }",
    variables : JSON.stringify({
      myBoardId: YOUR_BOARD_ID,
      myItemId: YOUR_ITEM_ID,
      columnId: "YOUR_COLUMN_ID",
      myColumnValue: "dropdown_index_1, dropdown_index_2"
      })
    })
  })
curl "https://api.monday.com/v2" \
-X POST \
-H "Content-Type:application/json" \
-H "Authorization: MY_API_KEY" \
-d '{"query":"mutation{change_simple_column_value (item_id:1297498722,board_id:1297498717, column_id: \"dropdown\", value: \"1,2\"){ name id}}"}'

Code examples using dropdown label values

Here is a sample query you can use to update the dropdown column using simple string values with dropdown labels:

mutation {
  change_simple_column_value (item_id: 1297498726, board_id: 1297498717, column_id:"dropdown", value: "Cookie, Cupcake") {
    id
  }
}
fetch ("https://api.monday.com/v2", {
  method: 'post',
  headers: {
    'Content-Type': 'application/json',
    'Authorization' : 'YOUR_API_KEY'
  },
  body: JSON.stringify({
    query : `mutation ($myBoardId:Int!, $myItemId:Int!, $myColumnValue: String!, $columnId: String!) {
                 change_simple_column_value (item_id:$myItemId, board_id:$myBoardId, column_id: $columnId, value: $myColumnValue) {
                   id
                 }
               }`,
    variables : JSON.stringify({
      myBoardId: YOUR_BOARD_ID,
      myItemId: YOUR_ITEM_ID,
      columnId: "YOUR_COLUMN_ID",
      myColumnValue: "dropdown_label_1, dropdown_label_2"
      })
    })
  })
  .then(res => res.json())
  .then(res => console.log(JSON.stringify(res, null, 2)));
curl "https://api.monday.com/v2" \
-X POST \
-H "Content-Type:application/json" \
-H "Authorization: MY_API_KEY" \
-d '{"query":"mutation{change_simple_column_value (item_id:1297498722,board_id:1297498717, column_id: \"dropdown\", value: \"Cookie, Cupcake\"){ name id}}"}'

JSON

You can also update the dropdown column using JSON values, and this can be done with either the ID value or the text label.

📘

NOTE

You can use both String and JSON values when updating column values for change_multiple_column_values mutation, or when using the create_item mutation.

Code example using dropdown ID values

Here is a sample query you can use to update the dropdown column using JSON values with dropdown IDs:

mutation {
  change_multiple_column_values(item_id:11111, board_id:22222, column_values: "{\"dropdown\": {\"ids\":[1]}}") {
    id
  }
}
fetch ("https://api.monday.com/v2", {
  method: 'post',
  headers: {
    'Content-Type': 'application/json',
    'Authorization' : 'YOUR_API_KEY'
  },
  body: JSON.stringify({
    query : `mutation ($myBoardId:Int!, $myItemId:Int!, $myColumnValues:JSON!) {
                 change_multiple_column_values(item_id:$myItemId, board_id:$myBoardId, column_values: $myColumnValues) {
                   id
                 }
               }`,
    variables : JSON.stringify({
      myBoardId: YOUR_BOARD_ID,
      myItemId: MY_ITEM_ID,
      myColumnValues: JSON.stringify({
      dropdown : {
            "ids": [1]
            },
      })
    })
  })
})
curl "https://api.monday.com/v2" \
-X POST \
-H "Content-Type:application/json" \
-H "Authorization: MY_API_KEY" \
-d '{"query":"mutation{change_multiple_column_values(item_id:1297498722,board_id:1297498717,column_values:\" {\\\"dropdown\\\":{\\\"index\\\":[1]}}\"){ name id}}"}'

Code example using label values

Here is a sample query you can use to update the dropdown column using JSON values with dropdown labels:

mutation {
  change_multiple_column_values(item_id:11111, board_id:22222, column_values: "{\"dropdown\":{\"labels\":[\"My label\"]}}") {
    id
  }
}
fetch ("https://api.monday.com/v2", {
  method: 'post',
  headers: {
    'Content-Type': 'application/json',
    'Authorization' : 'YOUR_API_KEY'
  },
  body: JSON.stringify({
    query : `mutation ($myBoardId:Int!, $myItemId:Int!, $myColumnValues:JSON!) {
                 change_multiple_column_values(item_id:$myItemId, board_id:$myBoardId, column_values: $myColumnValues) {
                   id
                 }
               }`,
    variables : JSON.stringify({
      myBoardId: YOUR_BOARD_ID,
      myItemId: MY_ITEM_ID,
      myColumnValues: JSON.stringify({
      dropdown : {
            "labels": "Cookie"
            },
      })
    })
  })
})
curl "https://api.monday.com/v2" \
-X POST \
-H "Content-Type:application/json" \
-H "Authorization: MY_API_KEY" \
-d '{"query":"mutation{change_multiple_column_values(item_id:1297498722,board_id:1297498717,column_values:\" {\\\"dropdown\\\":{\\\"labels\\\":[\\\"Cookie\\\"]}}\"){ name}}"}}'

📘

Do you have questions?

Join our developer community! You can share your questions and learn from fellow users and monday.com product experts.

Don’t forget to search before opening a new topic!


Did this page help you?