Column ids - difficult to handle figuring out for each column

Is it just me or the way Monday handles column ids is super difficult to manage? I have the graphql mutation running and every time I have to guess what is the columnId for the specific column I need to update. Not cool that I have to open the developer tools, inspect the network tab and then find the column id of my column. Isn’t there a way to avail this on the UI?

I can’t find a way to create subitems’ columns which could have sold the issue but still a lot of overhead for what should have been a pretty single thing to have

If you turn on Developer Mode in monday labs, your column ids will appear in the columns.
image
image

Just wondering, since you are already using the graphql mutation, why don’t you get the column ids through graphql?

And for creating columns in subitems: you can query the board, find the subitems column and query the setting_str.

{
  boards(ids: 1234567889) {
    columns (ids: "subitems0"){
      id
      settings_str
    }
  }
}

This give you:

{
  "data": {
    "boards": [
      {
        "columns": [
          {
            "id": "subitems0",
            "settings_str": "{\"allowMultipleItems\":true,\"itemTypeName\":\"column.subtasks.title\",\"displayType\":\"BOARD_INLINE\",\"boardIds\":[987654321]}"
          }
        ]
      }
    ]
  },
  "account_id": 123456
}

The boardId of the board holding the subitems can then be used to query or add columns

Thanks for your reply, I tried this and I’m not getting back any data

Submitted the following

query {
  boards(ids: XXX) {
    columns (ids: "subitems0"){
      id
      settings_str
    }
  }
}

I’m getting back the following

{
  "data": {
    "boards": [
      {
        "columns": []
      }
    ]
  },
  "account_id": XXX
}

Thanks @kolaai , never looked at it and this is very handy. I used the graphql query to fetch the columns as suggested by @basdebruin but it didn’t yield any data. For the time being able to get the ids like this is useful

In that case the columnId in your board is differs from the example I gave. You can’t rely on the column to be named “subitems0”. On a brand new board it is called “subitems” but even then you can’t rely on it. If there are no subitems on the board the columnId “subitems” does not even exists.

The safest way is to get all board columns and (in your code) look for the columnType “subtasks”, that will give you the correct columnId for your subitems.

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