How do you get item values?

I want to get specific column values from all items in two groups present within one board. For example, if there is a group with a list of items and each has an address and a phone number, I want to return those addresses and numbers (the column IDs could be something like “text2” and “number2”). What is the query for this?

Hey Brian! Welcome to the community :slight_smile:

In order to make a query like this, you’ll need to call the groups object and specify the IDs of the groups you’re looking for, and also call the column_values object with the IDs of the columns.

So, you should use a query like this:

query {
  boards(ids:XXXXXXX) {
    groups(ids:["group1", "group2"]) {
      items {
        column_values(ids:["text1", "status5"]) {

Let me know if that helps!


I know that this is horrible to read, but here’s my query (content type is json):

private const val query = "{\"query\":\"{boards(ids:309222228){groups(ids:[\"2019\",\"2018\"]){items{name id column_values(ids:[\"text2\",\"numbers2\"]){title value}}}}}\"}"

It’s returning “400 bad request.”

Edit: If I remove the group and item limits, it passes syntax checks but the complexity is too large. The limit formatting must be wrong.

Hey @brian! I think your quotes are mismatched. Try this:

private const val query = "{\"query\":\"{boards(ids:309222228){groups(ids:[\\\"2019\\\",\\\"2018\\\"]){items{name id column_values(ids:[\\\"text2\\\",\\\"numbers2\\\"]){title value}}}}}\"}"

I double-escaped all the strings-inside-strings :slight_smile: Let me know if that works!