<p>Dropdown fields support filtering by selected option values, so you should be able to do something like this:</p>
<pre class="lang-twig prettyprint-override"><code>{% for item in entry.children
    .dropdownField('value')
    .all()
%}
</code></pre>
<p>Note you need to use the value, IIRC using the label doesn't work. If you only have the label, you can go through the fields service to get the available options and then find the corresponding option value.</p>
<p>This is more accurate than going through the search index, since it uses the fields content column directly.</p>

CC BY-SA 4.0
2023-10-06T12:42:00.377Z
2023-10-06T12:42:00.377Z
MoritzLost
<p>I have a series of entries and I want to only display ones whose dropdown field matches a certain value. At the moment, my unfiltered query is like this:</p>
<pre><code>for item in entry.children.limit(6).orderBy('postDate desc').all()
</code></pre>
<p>Now I want to add to that something like <code>.search(dropdownField: value)</code> but that's not working, I get no results. What should it be?</p>

<entries><drop-down>
Filter entries on dropdown field value
# Filter entries on dropdown field value

(Asked by: username_0 on 2023-10-05)

I have a series of entries and I want to only display ones whose dropdown field matches a certain value. At the moment, my unfiltered query is like this:
for item in entry.children.limit(6).orderBy('postDate desc').all()

Now I want to add to that something like .search(dropdownField: value) but that's not working, I get no results. What should it be?

**Tags:** entries, drop-down

---

## 1 answers

### Answer by username_1 on 2023-10-06. Score: 1

Dropdown fields support filtering by selected option values, so you should be able to do something like this:
{% for item in entry.children
    .dropdownField('value')
    .all()
%}

Note you need to use the value, IIRC using the label doesn't work. If you only have the label, you can go through the fields service to get the available options and then find the corresponding option value.
This is more accurate than going through the search index, since it uses the fields content column directly.


---

