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 🙂
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:i"group1", "group2"]) {
items {
name
id
column_values(ids:i"text1", "status5"]) {
title
value
}
}
}
}
}
Let me know if that helps!
Cheers,
Dipro
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:s\\"2019\\",\\"2018\\"]){items{name id column_values(ids:s\\"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 🙂 Let me know if that works!
Cheers,
Dipro
Login to monday.com
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.