<p>Figured it out - I needed to remove the limit earlier in the process: adding 'limit' => null after line 72 of SuperTableVariable.php did the trick.</p>

<p>I'll submit a pull request to that effect as soon as I figure out how to do that. </p>

CC BY-SA 3.0
2017-09-03T17:46:12.327Z
2017-09-03T17:46:12.327Z
mierla
<p>I've got two kinds of channel entries: <code>Bills</code> and <code>Legislators</code>. <code>Legislators</code> have a SuperTable of votes. Each vote is related to one <code>Bill</code>. I want to get all the votes associated with a particular <code>Bill</code> and display them on that <code>Bill</code>'s page, but I can't fetch more than 100 items. Here's my current code:</p>

<pre><code>{% set reverseRelatedVotes = craft.supertable.getRelatedElements({
    relatedTo: {
        targetElement: entry,
        field: 'scorecardVotes.bill',
        },
    section: 'legislators'
}).limit(null).order('lastName ASC') %}
</code></pre>

<p><code>limit(10)</code> works as expected, but anything over the standard Craft limit of 100 returns 100. How can I get all the related votes for a given <code>Bill</code>?</p>

<templating><plugin-supertable>
Override SuperTable reverse related entries limit
# Override SuperTable reverse related entries limit

(Asked by: username_0 on 2017-08-31)

I've got two kinds of channel entries: Bills and Legislators. Legislators have a SuperTable of votes. Each vote is related to one Bill. I want to get all the votes associated with a particular Bill and display them on that Bill's page, but I can't fetch more than 100 items. Here's my current code:
{% set reverseRelatedVotes = craft.supertable.getRelatedElements({
    relatedTo: {
        targetElement: entry,
        field: 'scorecardVotes.bill',
        },
    section: 'legislators'
}).limit(null).order('lastName ASC') %}

limit(10) works as expected, but anything over the standard Craft limit of 100 returns 100. How can I get all the related votes for a given Bill?

**Tags:** templating, plugin-supertable

---

## 1 answers

### Answer by username_0 on 2017-09-03. Score: 0 | Accepted answer

Figured it out - I needed to remove the limit earlier in the process: adding 'limit' => null after line 72 of SuperTableVariable.php did the trick.

I'll submit a pull request to that effect as soon as I figure out how to do that.


---

