<p>I've bumped into this a few times. It's because <code>entry.fieldHandleName</code> when used on a field type with multiple options (dropdowns/radios etc) is in fact a magic shortcut for <code>entry.fieldHandleName.value</code>.  You can see this if you <code>dump</code> out the variable to the screen: <code>&lt;pre&gt;{{ dump(entry.applicationStatus) }}&lt;/pre&gt;</code>.</p>
<p>So, you need to append <code>.value</code> on to the end: <code>{% if entry.applicationStatus.value in ['submitted'] %}{% endif %}</code></p>

CC BY-SA 4.0
2021-06-21T08:54:02.447Z
Ah - makes perfect sense. Thanks!
mmc501
CC BY-SA 4.0
2021-06-21T08:50:42.607Z
2021-06-21T08:50:42.607Z
James Smith
<p>I am probably doing something daft here, but tried multiple things to no resolution.
I trying to find if a value is in an array but my test case doesn't match.</p>
<pre><code>{% if entry.applicationStatus == 'submitted' %}{% endif %}   # matches ok             
{% if entry.applicationStatus in ['submitted'] %}{% endif %} # doesn't match
</code></pre>
<p>The array check in the above case doesn't match.  entry.applicationStatus is a dropdown menu.
I will want to check for multiple values which is why I want to check if it is in an array.</p>

<templating><array>
in array not matching
# in array not matching

(Asked by: username_0 on 2021-06-21)

I am probably doing something daft here, but tried multiple things to no resolution.
I trying to find if a value is in an array but my test case doesn't match.
{% if entry.applicationStatus == 'submitted' %}{% endif %}   # matches ok             
{% if entry.applicationStatus in ['submitted'] %}{% endif %} # doesn't match

The array check in the above case doesn't match.  entry.applicationStatus is a dropdown menu.
I will want to check for multiple values which is why I want to check if it is in an array.

**Tags:** templating, array

---

## 1 answers

### Answer by username_1 on 2021-06-21. Score: 1 | Accepted answer

I've bumped into this a few times. It's because entry.fieldHandleName when used on a field type with multiple options (dropdowns/radios etc) is in fact a magic shortcut for entry.fieldHandleName.value.  You can see this if you dump out the variable to the screen: {{ dump(entry.applicationStatus) }}.
So, you need to append .value on to the end: {% if entry.applicationStatus.value in ['submitted'] %}{% endif %}

> **Comments:**
> **username_0**: Ah - makes perfect sense. Thanks!  

---

