"Date" : "This column ID doesn't exist for the board" - Monday API

Hi!

Was unable to figure out the syntax for adding a date in JS. Did not manage to figure it out so moved over to GraphQL in your testing environment.

mutation {
  change_multiple_column_values(item_id:XXXXXXXXX5, board_id:XXXXXXXXX8, column_values: "{\"date\" : {\"date\" : \"1993-08-27\", \"time\" : \"18:00:00\"}}") {
    id
  }
}`

Yields:

{
  "error_code": "InvalidColumnIdException",
  "status_code": 200,
  "error_message": "This column ID doesn't exist for the board",
  "error_data": {
    "column_id": "date",
    "error_reason": "store.monday.automation.error.missing_column"
  }
}

Querying the same boards yields:


{
  "data": {
    "boards": [
      {
        "owner": {
          "id": XXXXXXXXXX
        },
        "columns": [
          {
            "title": "Name",
            "type": "name"
          },
          {
            "title": "Person",
            "type": "multiple-person"
          },
          {
            "title": "Status",
            "type": "color"
          },
          {
            "title": "Date",
            "type": "date"
          }
        ]
      }
    ]
  },
  "account_id": XXXXXXXXXX
}

Removing and re-creating the date column doesn’t improve the situation. Have I missed something?

Hello @AndreasGT ,

To know what the date column id is, you will have to query it. In your query, you queried only for the title and type. Add id to the list of variables you are querying to give you the column ids. Then use the returned id in your mutation.
You can find the documentation for column values here

3 Likes

Hello @kolaai ,

Spot on.

data id is “data6”.

When “Deleting” the date column and recreating it, the number changes.
I did this two times, date# was allocated to date7, and then date2.

I think it would be advantageous to add this to the “date” documentation. I spent quite a long time on this. :upside_down_face:

Available here : Date

Thank you!