Skip to main content

I’m trying to figure how how to do the below filter using Monday API. I do not see how to filter out results where there is not a match:



{
items_page_by_column_values(
limit: 50,
board_id: BOARDID,
columns: :
{ column_id: "checkbox", column_values: :"1", "t", "true"] },
{ column_id: "text1", column_values: :"false", "", null] },
{ column_id: "text97", column_values: :"false", "", null] },
{ column_id: "date0", column_values: :--IS NOT EMPTY--] }
]
) {
cursor
items {
id
name
column_values(ids: :"date4", "text", "text4", "text5", "text9", "text8", "date", "text1", "text94", "date0", "checkbox", "text97", "text45", "text90"]) {
id
value
}
}
}
}

Hello there @tbcosk,


What about using something like this:


{
boards(ids: 11111111) {
items_page(
limit: 10
query_params: {rules: [{column_id: "date4", compare_value: [""], operator: is_not_empty}, {column_id: "text", compare_value: ["a", "b"], operator: any_of}], operator: and}
) {
cursor
items {
id
name
}
}
}
}

Could that work as a solution for you?


Cheers,

Matias


Thanks for the reply. I think so. I will implement and see how it goes. Can I ask, when should I use items_page vs items_page_by_column_values? I assumed if I needed to filter on multiple columns, that is where items_page_by_column_values would be advantaged but it seems to lack features that are available in items_page. I realize this is probably just me not understanding the two.


Hello again @tbcosk,


items_page can be used with or without “rules” to specify data in the column values to be looked for. items_page_by_column_values must have a criteria. In many cases, both solutions are correct.


But if you have a specific example, please send it over and I will take a look 😁


Cheers,

Matias


Reply