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.
Hey there @Skatcher 👋
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.
-Alex
Thanks @AlexSavchuk
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!
@Skatcher
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.
-Alex
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
@Skatcher
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 🙂
-Alex
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.
Check out my recent announcement for more information: "RELEASED] Items by Multiple Column Values Query.
Thanks!