Skip to content
HubSpot Developer Changelog

Filter improvements for HubL CRM functions

The eq (equal) filter which can be used in query parameters of the crm_objects, crm_object, and crm_associations HubL functions, acts more in-line with the behavior expected for a contains comparison. We're correcting this by updating the eq filter to evaluate that a property is exactly equal to the passed condition, and adding a contains filter for string properties (Previously only supported in properties with multiple values).

This means queries using these functions which previously returned CRM object instances because the condition contained a certain value will now only return object instances where the condition is exactly true. If your desire is to continue to return object instances where a property contains a certain value, you can update your code to utilize the new contains filter.
Given a contact with the first name "Billy Bob":
crm_objects("contact", "firstname__eq=Billy", "firstname,lastname")
would have returned the aforementioned contact. After this change, the contact will no longer be returned, unless the filter is updated to the contains operator.
Notably, the contains operator will search through entire words separated by spaces inside of a property, and will not find substrings of an individual word. For example, it will find "Billy" in "Billy Bob", but will not find "Will" in "William".
crm_objects("contact", "firstname__contains=Will", "firstname,lastname")

When is this happening?

The eq filter change will be rolling out to accounts starting on February 22nd, 2024.

Because the functionality previously was more similar to contains which would have previously shown more results than it should have and this was never the intended or described functionality for eq, we're considering this a bug fix. This change will make the eq filter match the intended behavior as described in the documentation, while the current behavior has often led to extra unexpected results being displayed. For many sites this will make pages using these functions work as the developer originally intended. For sites that prefer the contains style behavior, that's now an option they can explicitly choose to use.

Questions or comments? Join us in the developer forums to discuss.