<p>Currently the only way to find entries that have Matrix rows is with the <code>search</code> param:</p>

<pre><code>{% set entry = craft.entries.section('entries').search('quote:*').order('RAND()').limit(1) %}
</code></pre>

CC BY-SA 4.0
2019-09-26T07:42:53.477Z
is this true for craft 3 as well?
outline4
CC BY-SA 3.0
2014-06-26T09:40:02.330Z
2014-06-26T09:40:02.330Z
Brandon Kelly
<p>I am trying to get a random entry which has the <code>quote</code> matrix field populated.</p>

<p>I've tried this:</p>

<pre><code>{% set entry = craft.entries.section('entries').quote(':notempty:').order('RAND()').limit(1) %}
</code></pre>

<p>That isn't working. What do I need to do?</p>

<entries><matrix>
Return entry where matrix field is not empty
# Return entry where matrix field is not empty

(Asked by: username_0 on 2014-06-26)

I am trying to get a random entry which has the quote matrix field populated.
I've tried this:
{% set entry = craft.entries.section('entries').quote(':notempty:').order('RAND()').limit(1) %}

That isn't working. What do I need to do?

**Tags:** entries, matrix


---

## 1 answers

### Answer by username_1 on 2014-06-26. Score: 7 | Accepted answer

Currently the only way to find entries that have Matrix rows is with the search param:
{% set entry = craft.entries.section('entries').search('quote:*').order('RAND()').limit(1) %}

> **Comments:**
> **username_2**: is this true for craft 3 as well?  

---

