CMS Development

Hubmate
Contributor

HubDB - Only retrieving 1000 rows from table of 1544 rows

SOLVE

Hello,

 

I've created a HubDB table which has 1544 rows. I'm then pulling in the data into this page with a HubL for loop: http://dutypoint-4097839.hs-sites.com/downloads As you can see, only the first 1000 rows are being added. Here is the HubL I am using:

 

{% set table = hubdb_table_rows(675787) %}

<table id="example" class="display" cellspacing="0" width="100%">
<thead>
<tr>
<th class="file-type"></th>
<th class="info"></th>
<th class="type"></th>
<th class="snippet"></th>
<th class="btn"></th>
</tr>
</thead>
<tbody>
{% for row in table %}
<tr class="row">
<td class="file-type">
{% if row.url is string_containing ".pdf" %}<span class="file-icon file-icon--large file-icon--pdf"></span>{% endif %}
{% if row.url is string_containing ".dwg" %}<span class="file-icon file-icon--large file-icon--dwg"></span>{% endif %}
{% if row.url is string_containing ".rfa" %}<span class="file-icon file-icon--large file-icon--rfa"></span>{% endif %}
</td>
<td class="info">
<h4>{{ row.name }}</h4>
<span>{{ row.file_size }}</span>
<span>{{ row["type"].name }}</span>
</td>
<td class="type">
<span>{{ row["type"].name }}</span>
</td>
<td class="snippet">{{ row.text }}</td>
<td class="btn">
<a class="button red" target="_blank" href="{{ row.url }}">Download</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>

 

I am also using this plugin to process the data and create pagination: https://datatables.net/ Does anyone know if there is a limit on HubL for loops? I am trying to figure out whether it is HubDB, the HubL I am using or the plugin which is causing the HubDB to only retrieve 1000 rows.

 

Thanks for any help,

Steve

0 Upvotes
1 Accepted solution
TRooInbound
Solution
Key Advisor

HubDB - Only retrieving 1000 rows from table of 1544 rows

SOLVE

Hi @Hubmate,

 

Yes, there is default value of hubdb table is 1000 rows, 

 

Need to extend limit using << limit >> like this,

{% for row in hubdb_table_rows(741094, 'limit=9999') %}

Did my post help answer your query? Help the Community by marking it as a solution.

 

Team TRooInbound

View solution in original post

1 Reply 1
TRooInbound
Solution
Key Advisor

HubDB - Only retrieving 1000 rows from table of 1544 rows

SOLVE

Hi @Hubmate,

 

Yes, there is default value of hubdb table is 1000 rows, 

 

Need to extend limit using << limit >> like this,

{% for row in hubdb_table_rows(741094, 'limit=9999') %}

Did my post help answer your query? Help the Community by marking it as a solution.

 

Team TRooInbound