Skip to main content

Hello,

I’m contacting you because I would like some clarification on an API-related matter. I wanted to know if it’s currently possible with the “Items_page” function to filter two or more names from a dropdown menu. If so, how? I tested it with this format: “o{column_id: “scrolling_Menu”, compare_value: o“word1”, “word2”], operator: contains_text}]”, but only the information for “word1” is displayed, and “word2” is ignored. I know it works with individuals or text because it worked during testing and in the documentation.


Sincerely, Delépine Tom

hi @TomDel


Looks like the contains_text operator does not support an array of compare values. Instead you can do this:


{
boards(ids: [123456789]) {
items_page(
query_params: {rules: [{column_id: "dropdown", compare_value: ["label1"], operator: contains_text}, {column_id: "dropdown", compare_value: ["label2"], operator: contains_text}], operator: or}
) {
cursor
items {
id
name
}
}
}
}

When using the labelId and operator any_of you can use an array of compare values, like:


{
boards(ids: [123456789]) {
items_page(
query_params: {rules: [{column_id: "dropdown", compare_value: [1, 2], operator: any_of}]}
) {
cursor
items {
id
name
}
}
}
}

Hello,

thank you for your response. It is clearer now, and I appreciate it.


Thank you so much @basdebruin !


Hi Matias,


Is it intended behavior that the contains_text operator does only compare with the first given text value in the array? This one gives only the items that containls “label1”, not “label2”


{
boards(ids: d4048117859]) {
items_page(
query_params: {rules: {{column_id: "dropdown", compare_value: _"label1", "label2"], operator:contains_text}], operator: or}
) {
cursor
items {
id
name
}
}
}
}

Hello there @basdebruin,


That is intended behavior. For items_page, contains_text accepts one value only 😁


Reply