I’m using the below query at the moment which works fine, but I only want the data for two specific columns. I am giving the text/string value (column name) as the column ‘id’, but so far none of my attempts have worked. Here is my current query and hope someone can help: boards (ids:XXXX) { items { column_values { title text }}}}
Things I tried: thought I could maybe specify the column by providing its title, “Status”, to the title key. Also tried to refer to it by "id: “Status” but this didn’t work. I had that under columns/column_values. Maybe my syntax was wrong, but could be faulty approach too!
I am not sure if retrieving specific column values is possible. What you could do is take all the values and filter out the ones you need . I am using same approach for now. May be someone from Monday could confirm otherwise.
That’s a great question! It is currently not possible to retrieve a specific column by name, or ID, and I would indeed recommend querying all of the board data and then filtering the specific values you need in your application logic instead. I hope that helps.
EDIT: I stand corrected - please check @mitchell.hudson 's post just below my own that provides a working API query example that can look up column values based on column ID.
Indeed, as @mitchell.hudson shows, it is possible to retrieve column data by columnId. This is not possible by column_name. It looks like this is because column names can be changed by the user, where column ids are set by the system and can’t be changed.
@mitchell.hudson oh, that makes perfect sense! I am sorry for the misleading answer previously, and I really appreciate your clarification here, especially with a working code example as well.
@basdebruin thank you for siding with Mitchell here