Developer Announcements

HubSpot Employee
HubSpot Employee

Filter Improvements for HubL CRM Functions

This content below is from the following changelog post: 

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 you want to continue to return object instances where a property contains a certain value instead, you can update your code to utilize the new contains filter.


With the old behavior the function above would return contacts with the first name "William" and "Will". The new behavior will only return a contact with "Will" as the first name. eq checks if the value is explicitly equal to the given value.


Using contains will result in returning contacts with the first names "Will" and "William". Contains checks if the value contains the given string.

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 below

Jon McLaren

Sr. CMS Developer Advocate

Get started developing on the HubSpot CMS Developer Changelog
How to optimize your CMS Hub site for speed

If my reply answered your question, please mark it as a solution, to make it easier for others to find.

0 Replies 0

0 Replies

No replies on this post just yet

No one has replied to this post quite yet. Check back soon to see if someone has a solution, or submit your own reply if you know how to help! Karma is real.

Reply to post

Need help replying? Check out our Community Guidelines