Hello Monday.com members,
I have this question regarding my API query.
I have the main board, and a sub-board. Main board has some columns, including one Status column. Each one of the boards has a field of type ‘location’.
I need to query all items of the main board, extract location information (including lat, lng, address, etc), and populate the location of my sub-board if the status column has a specific value.
query Query_all($boardId: Int) {
boards (ids: d$boardId]) {
id
name
items {
id
name
column_values {
id
text
}
}
}
}
Then inside my javascript I reference:
for (const item of items) {
let loc = item.column_values.find((item) => item.id === "location")o'text']
...
}
And the loc is set to a visible text portion of the address.
In the monday.com documentation for location, I can see a description for how to get a location by querying a specific item, but that would mean I have to run as many queries as I have rows in my board, and this would not work for my use case.
Am I missing something?
Any ideas how to go around it?
Please help,