crm_object function: Limit value overrides total value

Hi,

I need some help.

I have a job custom object and declared using crm_objects function. I noticed on the print that the limit value overides the offset value, and is not getting the correct total number of my custom job object.

{# Get job object #}
{% set jobs_init = crm_objects(‘job’, ‘offset=0&limit=20’)%}
<p>{{jobs_init}} </p>

Print Result:
{has_more=true, offset=20, total=20, results=[{20 job result listed}]

-------------------------------------------------------------------------------------

I also tried calling the the job custom object without the offset and limit queries

{# Get job object #}
{% set jobs_init = crm_objects(‘job’)%}
<p>{{jobs_init}} </p>

Print Result:

{has_more=true, offset=10, total=10, results=[{hidden}]}

This is the total number of jobs we have:

MEmpeo_0-1683645459467.png

Has anyone encountered the same issue and is there a fix?

Hi @MEmpeño,

From the docs Accounts Dashboard | HubSpot

  • offset is the offset to use for the next batch of results.

So it is returning the offset you would use to get the next batch of objects. For example if you do:

{% set jobs_init = crm_objects('job', 'offset=20&limit=20') %}

You should get something like this:

{has_more=true, offset=40, total=20, results=[{20 job result listed}]

Let me know if I am misunderstanding what you are saying or if you have any other questions.

Best,