Answers.Body: <p>According to <a href="http://buildwithcraft.com/docs/table-fields">the Craft docs</a> , the table field returns an array of rows.</p>
  
  <p>Assuming that is the case, you should be able to use <a href="http://twig.sensiolabs.org/doc/filters/slice.html">the Twig <code>slice</code> filter</a>:</p>
  
  <pre><code>{% for row in registration.registrationCost | slice(0, 3) %}
  </code></pre>
  
  <p>You can then use a simple conditional to output the row divider:</p>
  
  <pre><code>{% if loop.index == 3 %}  
      &lt;hr&gt;  
  {% endif %}
  </code></pre>
  
  <p>Stephen</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-07-30T12:38:14.333Z
Answers.Text: Thank you Stephen. Steve Abraham just suggested the same thing. I was incorrectly using .limit() before.
Answers.UserDisplayName: Steven Grant
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-07-30T12:43:15.730Z
Answers.Text: STEVE ALL THE THINGS!
Answers.UserDisplayName: Stephen Lewis
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-07-30T12:45:02.000Z
Answers.Text: tis a fine name -- even with your funny spelling :)
Answers.UserDisplayName: Steven Grant
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-07-30T15:05:40.393Z
Answers.Text: Had to comment, just to complete the set.
Answers.UserDisplayName: Steve Abraham
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-07-30T12:10:00.160Z
Answers.LastActivityDate: 2014-07-30T15:26:18.773Z
Answers.LastEditDate: 2014-07-30T15:26:18.773Z
Answers.UserDisplayName: Stephen Lewis
Body: <p>I want to limit the rows returned here to 4, then if loop.index is 3 display a separator and then output the last row.</p>
  
  <p>Does the table field have that kind of control?</p>
  
  <pre><code>{% for row in registration.registrationCost %}
      &lt;li class="circle"&gt;
          &lt;h3 class="registration-cost"&gt;{{ row.cost }}&lt;/h3&gt;
          &lt;hr/&gt;
          &lt;h5&gt;Through&lt;/h5&gt;
          &lt;h4&gt;{{ row.date }}&lt;/h4&gt;
      &lt;/li&gt;          
  {% endfor %}
  </code></pre>
  
Tags: <templating><field><globals>
Title: How can I limit the rows returned in a table field?
ThreadText: # How can I limit the rows returned in a table field?
  
  (Asked by: username_0 on 2014-07-30)
  
  I want to limit the rows returned here to 4, then if loop.index is 3 display a separator and then output the last row.
  
  Does the table field have that kind of control?
  
  ```
  {% for row in registration.registrationCost %}
      <li class="circle">
          <h3 class="registration-cost">{{ row.cost }}</h3>
          <hr/>
          <h5>Through</h5>
          <h4>{{ row.date }}</h4>
      </li>          
  {% endfor %}
  
  ```
  
  **Tags:** templating, field, globals
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2014-07-30. Score: 7 | Accepted answer
  
  According to [the Craft docs](http://buildwithcraft.com/docs/table-fields) , the table field returns an array of rows.
  
  Assuming that is the case, you should be able to use [the Twig `slice` filter](http://twig.sensiolabs.org/doc/filters/slice.html):
  
  ```
  {% for row in registration.registrationCost | slice(0, 3) %}
  
  ```
  
  You can then use a simple conditional to output the row divider:
  
  ```
  {% if loop.index == 3 %}  
      <hr>  
  {% endif %}
  
  ```
  
  username_1
  
  > **Comments:**
  > **username_0**: Thank you username_1. username_2 username_2 just suggested the same thing. I was incorrectly using .limit() before.  
  > **username_1**: username_2 ALL THE THINGS!  
  > **username_0**: tis a fine name -- even with your funny spelling :)  
  > **username_2**: Had to comment, just to complete the set.  
  
  ---
  
  