# CRM\_objects function values with spaces

**URL:** <https://community.hubspot.com/t/crm-objects-function-values-with-spaces/119965>\
**Category:** CMS Development\
**Tags:** professional\
**Created:** [November 6, 2024, 10:04pm UTC](https://community.hubspot.com/t/crm-objects-function-values-with-spaces/119965 "2024-11-06T22:04:48Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ACarrillo7](https://avatars.discourse-cdn.com/v4/letter/a/58f4c7/32.png) [@ACarrillo7](https://community.hubspot.com/u/ACarrillo7)\
**Post date:** [November 6, 2024, 10:04pm UTC](https://community.hubspot.com/t/crm-objects-function-values-with-spaces/119965/1 "2024-11-06T22:04:48Z")

</div>

Hey guys

Trying to query a options property where one of the options has special characters like the image bellow

 ![ACarrillo7_0-1730930485775.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/8/2/82f1091e15dfe6359ae4fdb94203063786e12056.png)

The query is

`{% set test_event = crm_objects("custom_object",'limit=100&property_type__contains=Land Development','address,property_type') %}`

Just like this suggested [https://community.hubspot.com/t5/CMS-Development/Special-Characters-in-crm-objects-query/m-p/1025074#M40235](https://community.hubspot.com/t5/CMS-Development/Special-Characters-in-crm-objects-query/m-p/1025074#M40235)

But that is not working, any ideas on how to solve this?

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [November 7, 2024, 4:48pm UTC](https://community.hubspot.com/t/crm-objects-function-values-with-spaces/119965/2 "2024-11-07T16:48:03Z")

</div>

Hi, @ACarrillo7 👋 Thanks for your question. I appreciate you including your example. I’d like to ask some of our community champions if they have been successful making a query like this — hey @evaldas @alyssamwilie @Anton, do you have any additional suggestions for @ACarrillo7?

Thank you very much! — Jaycee

---

<div class="post-metadata">

**Author:** ![Anton](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/anton/32/103167_2.png) [@Anton](https://community.hubspot.com/u/Anton)\
**Post date:** [November 7, 2024, 8:41pm UTC](https://community.hubspot.com/t/crm-objects-function-values-with-spaces/119965/3 "2024-11-07T20:41:24Z")

</div>

Hey @ACarrillo7,

I’d try to encode it like

`{% set test_event = crm_objects("custom_object",'limit=100&property_type__contains=Land%20%26%20Development','address,property_type') %}`

| **Element** | **encoded variant** |
| --- | --- |
| ’ ’ (space) | %20 |
| & | %26 |

or chage it to the [string\_startingwith expression test](https://developers.hubspot.com/beta-docs/reference/cms/hubl/operators-and-expression-tests#string_startingwith) like

`{% set test_event = crm_objects("custom_object",'limit=100&property_type__string_startingwith=Land','address,property_type') %}`

best,

Anton

---

<div class="post-metadata">

**Author:** ![ACarrillo7](https://avatars.discourse-cdn.com/v4/letter/a/58f4c7/32.png) [@ACarrillo7](https://community.hubspot.com/u/ACarrillo7)\
**Post date:** [November 7, 2024, 11:14pm UTC](https://community.hubspot.com/t/crm-objects-function-values-with-spaces/119965/4 "2024-11-07T23:14:57Z")

</div>

Much thanks for your quick response,

I removed the character “&” from the property value (so the property option is now “Land Development” instead of “Land & Development”), and it worked. Understandable but still a bit weird

---

<div class="post-metadata">

**Author:** ![evaldas](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/evaldas/32/69160_2.png) [@evaldas](https://community.hubspot.com/u/evaldas)\
**Post date:** [November 7, 2024, 10:24pm UTC](https://community.hubspot.com/t/crm-objects-function-values-with-spaces/119965/5 "2024-11-07T22:24:00Z")

</div>

@Anton I didn’t have any luck with the encoding or the “startswith” option.

I think there might be a bug that made it’s way in or a change happened that I am not aware of because even if you just use one of the words, it does not return any results:

`{% set test_event = crm_objects("custom_object",'limit=100&property_type__contains=Land','address,property_type') %}`

Logically this should work. This actually works if the property is a plain text property but does not return any results if it’s a dropdown select property (which has an internal value).

---

<div class="post-metadata">

**Author:** ![ACarrillo7](https://avatars.discourse-cdn.com/v4/letter/a/58f4c7/32.png) [@ACarrillo7](https://community.hubspot.com/u/ACarrillo7)\
**Post date:** [November 7, 2024, 11:13pm UTC](https://community.hubspot.com/t/crm-objects-function-values-with-spaces/119965/6 "2024-11-07T23:13:54Z")

</div>

Thanks for your quick response,

It seems to be a bug. I removed the character “&” from the property value (so the property option is now “Land Development” instead of “Land & Development”), and it worked. Understandable but still a bit weird.
