APIs & Integrations

elmo
Contributor

HubDB get table rows filter operator 'not_like' works exactly as 'like', not its opposite

There are next to none instructions how the operator 'like' works when getting HubDB table rows through API - at least it doesn't work like the SQL 'like', as it doesn't accept (URL encoded) % wildcards.

However, at the least it seems to work like the 'icontains' operator, but case-sensitively. So, my expectation would be that using the operator 'not_like' it would return all the other rows than with the 'like' operator. But it also returns exactly the same rows. So, I believe this is a bug.

See for yourself. This GET query returns two rows from one of my tables (listing some ebook & video content and such):

https://api.hubapi.com/hubdb/api/v1/tables/700210/rows?portalId=1797693&url__like=smartbound

It returns two rows, and the url column is the second one, and the results are correct. However, this query returns exactly those two rows, not all the 41 others rows that there are on the table.

https://api.hubapi.com/hubdb/api/v1/tables/700210/rows?portalId=1797693&url__not_like=smartbound

This seems to happen whatever I put after the _ __not_like= _.

0 Upvotes
3 Replies 3
Derek_Gervais
HubSpot Alumni
HubSpot Alumni

HubDB get table rows filter operator 'not_like' works exactly as 'like', not its opposite

Hi @elmo,

Thanks for your patience here. This wasn't a particularly quick fix, but I wanted to follow up and let you know that this issue is now resolved; you should see proper behavior from both the like and not_like filters.

0 Upvotes
elmo
Contributor

HubDB get table rows filter operator 'not_like' works exactly as 'like', not its opposite

Thanks for the fix. I assume the functionality is still more like "contains", not the SQL "like", which supports wildcards? Could you edit the documentation to reflect this as well? I.e. https://developers.hubspot.com/docs/methods/hubdb/v2/get_table_rows

0 Upvotes
Derek_Gervais
HubSpot Alumni
HubSpot Alumni

HubDB get table rows filter operator 'not_like' works exactly as 'like', not its opposite

Hi @elmo,

That definitely seems off; I'll take this to my team now. I'll reach back out on this topic when I have more information related to this issue.