Check if a table field’s column has a value I am using a table field to display credits on a portfolio page.
The table field has three columns: hva, hvem and url.

The url should be optional and I want to set up an if statement showing it as a link if it has a value. Is this possible using the table field?

Also, the table field can have multiple rows.

I have tried to set up an if for row.url to see if has a value. And an else for when there is no URL.

{% if entry.credits|length %}
    {% for row in entry.credits %}
        {% if row.url == 0 %}
            &lt;li&gt;&lt;span class="bold"&gt;{{ row.hva }}:&lt;/span&gt; &lt;a href="{{ row.url }}"&gt;{{ row.hvem }}&lt;/a&gt;&lt;/li&gt;
        {% else %}
            &lt;li&gt;&lt;span class="bold"&gt;{{ row.hva }}:&lt;/span&gt; {{ row.hvem }}&lt;/li&gt;
        {% endif %}
    {% endfor %}
{% endif %}
You were close... 

Chaning this:

{% if row.url == 0 %}    


to this:

{% if row.url|length %}


should do it for you.