Answers.Body: <p>When you define a table field, it comes with one row by default. I'm not sure why this is. You can remove this row by clicking on the - icon: <img src="https://i.sstatic.net/yXBW3.png" alt="screen shot"></p>
  
  <p>To filter out those rows in twig, try:</p>
  
  <pre><code>{% for row in entry.discography if row.releaseName %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-21T20:53:03.593Z
Answers.Text: Everyone gets one table row for free.  The rest will cost you.
Answers.UserDisplayName: Brad Bell
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-21T20:45:35.320Z
Answers.LastActivityDate: 2015-07-21T20:45:35.320Z
Answers.UserDisplayName: Marion Newlevant
Body: <p>I'm doing, what I think should work fine, however, I'm still getting a blank table output on the page if the table field is left unfilled when creating the entry. It's like the "if" check is being ignored for some reason. The table with data outputs as expected fine. What am I missing here? Gotta be something simple. Here's a link to the page in question: <a href="http://nightowlmusic.org/family/rotiron" rel="nofollow">http://nightowlmusic.org/family/rotiron</a></p>
  
  <pre><code>{% if entry.discography | length %}
          &lt;table class="discography"&gt;
              &lt;tr&gt;
                  &lt;th colspan="3"&gt;Discography&lt;/th&gt;
              &lt;/tr&gt;
              {% for row in entry.discography %}
              &lt;tr&gt;
                  &lt;td class="release"&gt;{{ row.releaseName }}&lt;/td&gt;
                  &lt;td class="year"&gt;{{ row.releaseYear }}&lt;/td&gt;
                  &lt;td class="purchaseLink"&gt;
                      {% if row.purchaseLink %}&lt;a href="{{ row.purchaseLink }}" title="Purchase the Release"&gt;Click here to purchase&lt;/a&gt;{% endif %}
                  &lt;/td&gt;
              &lt;/tr&gt;
              {% endfor %}
          &lt;/table&gt;
  {% endif %}
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-07-21T20:44:49.380Z
Comments.Text: "...if the table field is left unfilled when creating the entry". Do you mean that you have no rows in your table? Or do you have one row, but none of the columns haven't been filled? By default, when creating a new table field in Craft, there is one row in the table. Can be a bit confusing. :)
Comments.UserDisplayName: André Elvan
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-07-21T20:45:41.743Z
Comments.Text: The columns have not been filled in.
Comments.UserDisplayName: Herb Himes
Tags: <table-field>
Title: How do you not output table field if there are no values?
ThreadText: # How do you not output table field if there are no values?
  
  (Asked by: username_0 on 2015-07-21)
  
  I'm doing, what I think should work fine, however, I'm still getting a blank table output on the page if the table field is left unfilled when creating the entry. It's like the "if" check is being ignored for some reason. The table with data outputs as expected fine. What am I missing here? Gotta be something simple. Here's a link to the page in question: <http://nightowlmusic.org/family/rotiron>
  
  ```
  {% if entry.discography | length %}
          <table class="discography">
              <tr>
                  <th colspan="3">Discography</th>
              </tr>
              {% for row in entry.discography %}
              <tr>
                  <td class="release">{{ row.releaseName }}</td>
                  <td class="year">{{ row.releaseYear }}</td>
                  <td class="purchaseLink">
                      {% if row.purchaseLink %}<a href="{{ row.purchaseLink }}" title="Purchase the Release">Click here to purchase</a>{% endif %}
                  </td>
              </tr>
              {% endfor %}
          </table>
  {% endif %}
  
  ```
  
  **Tags:** table-field
  
  > **Comments:**
  > **username_1**: "...if the table field is left unfilled when creating the entry". Do you mean that you have no rows in your table? Or do you have one row, but none of the columns haven't been filled? By default, when creating a new table field in Craft, there is one row in the table. Can be a bit confusing. :)  
  > **username_0**: The columns have not been filled in.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2015-07-21. Score: 3 | Accepted answer
  
  When you define a table field, it comes with one row by default. I'm not sure why this is. You can remove this row by clicking on the - icon: ![screen shot](https://i.sstatic.net/yXBW3.png)
  
  To filter out those rows in twig, try:
  
  ```
  {% for row in entry.discography if row.releaseName %}
  
  ```
  
  > **Comments:**
  > **username_3**: Everyone gets one table row for free.  The rest will cost you.  
  
  ---
  
  