Hello,
I’m having difficulty figuring out how to narrow down to a single item in a column of a Monday Board. The items are identified as 0, 1, 2 … but I’m unable to enter/identify it as such.
ex. entering {{ currentSourceRow.boards.items_page.items.0.name }} returns null.
I’m using the following GraphQL query (replacing actual Board ID #) to return data, that I’m attempting to display individual columns of a Monday board in a Retool app:
Please let me know if I can provide further information or context. Also, apologies if I’m not asking this with the best clarity - I’m very new to APIs in general.
Hello there @hollyhazeldine,
Using a query like that one will give you multiple items in the response if the board has more than one item:
I am not sure what you other platform is doing exactly, but it does say “currentSourceRow” so I believe it might be selecting a specific item from the board before you access the fields.
If you use the same query in your API Playground, do you see multiple items? If so, you will need to check the configuration on the other platform’s end.
Cheers,
Matias
Thank you so much Matias, this is incredibly helpful!
I do have a follow up question, now I’m attempting to create an item but I can only seem to identify one column of one type at a time (ex. text or long_text) and even if I specify multiple values, it replaces the first text column instead of moving onto the next text column. How can I differentiate/specify which column needs to be filled in based on the given value?
Current (not working) query:
mutation {
create_item (board_id: 123456789, item_name: “{{ projectName.value }}”, column_values: “{"name": "ready 3", "text": "{{ clientEmail.value}} ","long_text": "{{ projectDescription.value}} ","text": "{{ projectDeliverables.value}} "}” ) {
id
}
}
I am not sure I follow @hollyhazeldine,
This is the syntax you can use for what you are trying to do:
mutation {
create_item(
board_id: 1234567890
item_name: "My item"
column_values: "{\"text_mkm0kaam\":\"Some text\" ,\"long_text_mkm0akfe\":\"Text for the long text column\"}"
) {
id
}
}
You don’t need to pass the name twice. And you need to use backslashes to escape outer quotes 