apsimos
(Zeitnot)
April 26, 2024, 6:25am
1
Hi,
I want to search my board by item names using items_page_by_column_values
Grapql query. When I run the following query it returns empty result even though the item is on the board as active.
items_page_by_column_values(board_id:12345678, columns:[{column_id: "name", column_values: ["Task"]}]){
items{
id
}
}
Here is my board view:
As you see there are items including “Task” keyword but the api does not mange to find them.
How can I retrieve my items searching by the item name leveraging the API?
Thanks.
1 Like
basdebruin
(Bas de Bruin)
April 26, 2024, 7:53am
2
hi @apsimos
As far as I know the matches needs to be exact. What happens when your search for “Task 1”? Will that find your item?
apsimos
(Zeitnot)
April 26, 2024, 9:21am
3
Hi @basdebruin ,
Thanks for your reply. You are correct. It does exact match. But this is weird since I would like to filter my items with partial search.
Is there a way to do it, should I download all items and doing the search manually?
Best,
basdebruin
(Bas de Bruin)
April 26, 2024, 9:40am
4
I would use this query to get all items that contains “Task” in their name
query {
boards (ids: [12345678]) {
items_page (limit:100, query_params: {rules: [{column_id: "name", compare_value: ["Task"], operator: contains_text}]}) {
cursor
items {
id
name
}
}
}
}
2 Likes
apsimos
(Zeitnot)
April 26, 2024, 10:22am
5
Hi @basdebruin ,
That is working like a charm. Thank you very much.
Best
Thank you @basdebruin for the help here!
1 Like