Skip to main content

Cant set the status column when creating a new item

  • August 23, 2021
  • 2 replies
  • 919 views

I’m trying to create a new item but unable to find the correct syntax to set a status column, please can someone correct the below. (column_values: “status”, “Awaiting” )
Thanks

mutation {
create_item (board_id: 12345678, group_id: “topics”, item_name: “Test_Name”, column_values: “status”, “Awaiting” ) {
id
}
}

This topic has been closed for replies.

2 replies

kolaai
Forum|alt.badge.img
  • monday.com Partner
  • August 23, 2021

Setting the status column value requires an object with contains the object with the status id and a value of an object with the a label key and the label name. It will be helpful you you also add the create_labels_if_missing argument to create the label if it is not available. The final code will look something like this:

mutation {
  create_item (board_id: 12345678, group_id: "topics", item_name: "Test_Name", column_values: "{\\"status\\" : {\\"label\\" : \\"Awaiting\\"}}", create_labels_if_missing:true) {
        id
    }
}

where status is the status id.


  • August 30, 2021

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.