query {
items_by_column_values(
board_id: 1234567890,
column_id: "status",
column_value: "Done"
)
{
id
name
column_values {
id
text
value
}
}
items_by_column_values(
board_id: 1234567890,
column_id: "status2",
column_value: "Reviewing"
)
{
id
name
column_values {
id
text
value
}
}
}
Hey @sillywilly The items_by_column_values only can filter on one column at the moment. That said, this would be super cool! Iāll pass this along to our team to review.
Did this ever get any love? I could really use this. As it stands now It looks like I have to query multiple things and then use additional code to filter out the data I need from the JSON I receive from the query.
Thanks for reaching out about this functionality of the API, and I can definitely see how the current state of things is not too ideal. Iāll check this over with the team to see where things stand and weāll provide further updates to you in this thread.
If itās handy at all, the big thing Iām looking for is some expanded ability to use conditionals in my queries.
Ideally iād filter the data down in my API request to the absolute necessities before doing any processing. One major example I have is as follows-
I have a user that works on pulses across multiple boards. Iād like to grab the tasks hes assigned to across all boards that have a status column set to āin progressā that way at the time of the query I can determine everything this particular user is assigned to and working on- then do my processing on the data of these tasks separately.
As it stands now it looks like I have to query each board one by one, doing two queries for each board. The first query to grab all tasks set to āin progressā and the second to grab all tasks with that user assigned to them. Then I have to compare these results to filter down and compile all the relevant tasks into a single JSON for my program to work with.
Alternatively I could just query all the tasks on each board and then process that query to just grab the data associated to ones this user is assigned to and set to āin progress.ā
Solution A requires numerous queries, solution B requires less queries but they pull a huge amount of āuselessā data. Neither is Ideal I think!
Of course itās handy! Even the slightest bit of context into what you are currently working with, the things you are trying to achieve and the roadblocks you encounter along the way are really useful for us to gauge the impact this could potentially have, as well as your experience as a user when working with the API and monday.apps feature set. That is the mindset we are coming from, and itās basically āwe careā. I hope that sheds a bit more light on this.
To be transparent with you, it might take me a bit longer to get back to you with more details from our development team, but when I do get something more insightful to share here, Iāll make sure to share.
Hey @AlexSavchuk I wanted to pop back in with a more specific query in case we can brainstorm a work around or there is something Iām missing because this is currently becoming quite a barrier for what iām trying to accomplish.
I have 6 project managers and a pool of designers that are shared amongst the PMs. Iād like to be able to get any active task assigned to a specific designer.
It seems the best way so far for me to do this is to use the items_by_column_values query with some Aliases.
hereās an example query for 1 PM:
Sean: items_by_column_values(board_id:SeansBoardID column_id:"designer" column_value:"James"){
id
name
column_values(ids:"design status"){
text
}
}
This lets me grab all of my boardās tasks that are assigned to James, grab their design status, and then I can use javascript to check the JSON for any tasks that are āin progressā or ānot startedā from there. Thatās no problem. Unfortunately this uses about 100k complexity. Run it for 6 PMs boards and weāre at 600k complexity meaning if I try and grab active tasks for more than 16 designers in a minute Iām at my complexity cap. On top of this Iād like to note that weāve managed to constrain our PMās tasks to just 6 boards, one per PM, to make things like this possible. Weād love to have multiple boards per PM for better organization but unfortunately that causes huge headaches for things like dashboard limits or API query limits.
Is there a better way to do the query Iām looking for? The alternative, grabbing every item from every board, resulted in about the same 600k complexity for what itās worth, so that unfortunately is out as well.
I apologize if the answer is the same- it may just be that this type of query isnāt supported very well yet. I wanted to just jump back into this conversation with a very specific example in case there was any other suggestions
I am sorry for my delay in response here! Thanks so much for circling back here and providing further context to what you are looking for and the current roadblocks you are experiencing on the way.
Iāll have to double-check this with the team to see if we can find a better solution to what youāre looking for here and Iāll get back to you in this thread as soon as I know more
Hi all! To update, we do now have the ability to filter by multiple values within a single column. We havenāt quite released the ability to filter by multiple columns just yet.