Show just the first row of a table (stored in globals) Morning Craft folks, I've had a look and play but can't seem to find an answer for this.

I have a global variable with a company's various phone numbers in, stored in a table field.

The table shows the city, then the phone number for the company's numbers.

For the navigation, I want to show just the first phone number in the table.

.first() and .limit(1) don't seem to work in this situation.

&lt;li&gt;
    {% if companyDetails.telephoneNumbers | length %}
        {% for row in companyDetails.telephoneNumbers %}
            &lt;a href="#contact-us" role="menuitem" aria-selected="false"&gt;{{ row.number }}&lt;/a&gt;
        {% endfor %}
    {% endif %}

    &lt;span&gt;Call us&lt;/a&gt;&lt;/span&gt;
&lt;/li&gt;


Many thanks in advance.
first() and limit() are methods of the ElementCriteriaModel. Since a table is not an element, but just a plain array, you should use array filters.

So use Twig's slice filter instead.

&lt;li&gt;
    {% if companyDetails.telephoneNumbers | length %}
        {% for row in companyDetails.telephoneNumbers | slice(0, 1) %}
        &lt;a href="#contact-us" role="menuitem" aria-selected="false"&gt;{{ row.number }}&lt;/a&gt;
        {% endfor %}
    {% endif %}
    &lt;span&gt;Call us&lt;/a&gt;&lt;/span&gt;
&lt;/li&gt;