# Use Custom Object property in HubDB filterquery

**URL:** <https://community.hubspot.com/t/use-custom-object-property-in-hubdb-filterquery/93031>\
**Category:** CMS Development\
**Tags:** hubdb\
**Created:** [November 1, 2023, 8:40am UTC](https://community.hubspot.com/t/use-custom-object-property-in-hubdb-filterquery/93031 "2023-11-01T08:40:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![RBouwman](https://avatars.discourse-cdn.com/v4/letter/r/e8c25b/32.png) [@RBouwman](https://community.hubspot.com/u/RBouwman)\
**Post date:** [November 1, 2023, 8:40am UTC](https://community.hubspot.com/t/use-custom-object-property-in-hubdb-filterquery/93031/1 "2023-11-01T08:40:30Z")

</div>

Hi all,

I can’t figure out why this bit doesn’t work.

I want to use a custom object property in a filterquery for hubdb\_table\_rows.

```lia-code-sample
{% set function_group =<Object>["function_group"]%}
{% set filterquerytest = "limit=4&function_group=A" %}
{{ function_group }} #This results A
{% set filterquery = "limit=4&function_group=" ~ function_group %}
{{ filterquery }} # This results limit=4&function_group=A
{% for row in hubdb_table_rows(5321935, filterquery) %}

```

When I run this, it doesn’t work. When I change filterquery to filterquerytest it does. Can anybody assist with this?

Thanks in advance.

---

<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 2, 2023, 6:05pm UTC](https://community.hubspot.com/t/use-custom-object-property-in-hubdb-filterquery/93031/2 "2023-11-02T18:05:13Z")

</div>

Hey, @RBouwman 👋 Thanks for your question. Were you able to make any progress?

If not, here are a few suggestions:

Have you tried adding some additional debugging?

```lia-code-sample
{% for row in hubdb_table_rows(5321935, filterquery) %}
 {{ row }}
{% else %}
 No rows found.
{% endfor %}

```

HubL should handle leading and trailing whitespace, but you can try adding [**trim**](https://developers.hubspot.com/docs/cms/hubl/filters#trim) as a test to make sure no trailing whitespace or special characters might be causing issues

```lia-code-sample
{% set function_group =<Object>["function_group"] | trim %}

```

Best,

Jaycee

---

<div class="post-metadata">

**Author:** ![RBouwman](https://avatars.discourse-cdn.com/v4/letter/r/e8c25b/32.png) [@RBouwman](https://community.hubspot.com/u/RBouwman)\
**Post date:** [November 2, 2023, 9:01pm UTC](https://community.hubspot.com/t/use-custom-object-property-in-hubdb-filterquery/93031/3 "2023-11-02T21:01:02Z")

</div>

Hi [@Jaycee\_Lewis](https://community.hubspot.com/t5/user/viewprofilepage/user-id/127074) ,  
Thanks for your reply.  
Unfortunately, no solution yet.  
The value I get from the custom propert also seems unaffected by filters. Example:

```lia-code-sample
{% set function_group =<Object>["function_group"]%} 
{{ funtion_group }} #Result: 'A B'
{{ funtion_group|urlencode }} #Result 'A B' where i would expect 'A%20B'
{% set function_groupencoded =<Object>["function_group"]|urlencode%} 
{{ function_groupencoded }} #Result: 'A B' where i would expect 'A%20B'
{% set function_groupencoded = function_group|urlencode %}
{{ function_groupencoded }} #Result: 'A B' where i would expect 'A%20B'

```

It just seems the value of the property is fixed and cannot be used or changed.

Any other suggestions?  
Thanks in advance!
