Skip to main content

Hello,


Is it possible at all to search Monday via GraphQL query to make a query that returns partial matches for item name, using regex or wildcards in the search value? I am thinking of something like searching items with value “John*” and finding both “John Smith” and “John Doe” or am I restricted to finding only exact matches and there is nothing I can do about?


Thanks

Hello there @DevIntegrations,


As of today, the queries items_by_column_values and items_by_multiple_column_values are restricted to exact matches only.


Let me know if you have any other questions 🙂


Cheers,

Matias


Hey @Matias.Monday

Any update on this feature?

The search field in the board toolbar supports partial matches.

We would like to have the same functionality using the API.


Hello there @rob,


You can use a query like this one, which would give you (for example) two items, one with the text value being “John Doe”, and one with the value being “John Smith”:


query {
boards (ids: 7867452110) {
items_page (query_params: {rules: {{column_id: "text__1", compare_value: _"John"], operator:contains_text}]}) {
cursor
items {
name
id
}
}
}
}

The same applies for the name of the items:


query {
boards (ids: 7867452110) {
items_page (query_params: {rules: {{column_id: "name", compare_value: _"Jake"], operator:contains_text}]}) {
cursor
items {
name
id
}
}
}
}

This would give you as a result both an item with the name “Jake Roberts” and one with the name “Jake Pearson”.


Is that what you are looking for?


Cheers,

Matias


Hi @Matias.Monday

No, it’s not what we are looking for.

Here’s an example.

We have three items in the board.

Their names are:



  • abc>three spaces]001;

  • abc>one space]001;

  • def>one space]001.


Please note multiple spaces in the first item (I cannot display the spaces in this window).

If I search abc>one space]001 using the search field I get two results.


The search functionality through API doesn’t work this way.

It only accepts exact matches.


If I search abcdone space]001 I get only one result.

The same if I search abcdthree spaces]001.


The solution you suggest doesn’t work because splitting the search into two queries (abc and 001) I would get also defcone space]001 as a result.


Hello again @rob,


Thank you for the explanation! Now I understand.


Would you be able to please create a feature request here may adding this same specific example?


Looking forward to hearing from you!


Cheers,

Matias



Done.

https://community.monday.com/t/regex-support-in-items-by-column-values-and-items-by-multiple-column-values-methods/104066


Please everyone vote this request.


Reply