Skip to main content

Can't search an item name through items_page_by_column_values query

  • April 26, 2024
  • 5 replies
  • 151 views

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.

5 replies

basdebruin
  • Community Expert
  • April 26, 2024

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?


  • Author
  • Participating Frequently
  • April 26, 2024

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
  • Community Expert
  • April 26, 2024

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
            }
          }
        }
      }

  • Author
  • Participating Frequently
  • April 26, 2024

Hi @basdebruin ,

That is working like a charm. Thank you very much.

Best


Matias.Monday
Forum|alt.badge.img
  • monday.com Team Member
  • April 28, 2024

Thank you @basdebruin for the help here!