<p><strong>UPDATE</strong></p>
<p>As of Smart Map 2.3.0, this is now possible!</p>
<blockquote>
<p><a href="https://plugins.doublesecretagency.com/smart-map/filtering-entries-by-subfield-value/" rel="nofollow noreferrer">https://plugins.doublesecretagency.com/smart-map/filtering-entries-by-subfield-value/</a></p>
</blockquote>
<hr />
<p><strong>ORIGINAL</strong></p>
<p><s>Currently, this isn't possible. However, it's a popular feature request which is rising quickly on the priority list.</p>
<p>The current workaround (as you noted) is to simply filter the results afterward.</s></p>

CC BY-SA 4.0
2015-10-16T17:42:13.087Z
2021-01-01T06:24:59.813Z
2021-01-01T06:24:59.813Z
Lindsey D
<p>I have an ElementCriteriaModel in which I need to find elements that contain a particular value for "state", which is a property of a "Smart Map" field (<code>$element-&gt;smartMapField-&gt;state</code>).</p>

<p>Filtering after a <code>find</code> would be easy, but I need to do this in the ElementCriteriaModel, as I am passing it to the 'criteria' option for ElementAPI (<a href="https://github.com/pixelandtonic/ElementAPI" rel="nofollow">https://github.com/pixelandtonic/ElementAPI</a>).</p>

<elementcriteriamodel><filter><plugin-smartmap>
Filtering/Searching fields with enumerated data (e.g. Smart Map) in an ElementCriteria model
# Filtering/Searching fields with enumerated data (e.g. Smart Map) in an ElementCriteria model

(Asked by: username_0 on 2015-10-16)

I have an ElementCriteriaModel in which I need to find elements that contain a particular value for "state", which is a property of a "Smart Map" field (`$element->smartMapField->state`).

Filtering after a `find` would be easy, but I need to do this in the ElementCriteriaModel, as I am passing it to the 'criteria' option for ElementAPI (<https://github.com/pixelandtonic/ElementAPI>).

**Tags:** elementcriteriamodel, filter, plugin-smartmap

---

## 1 answers

### Answer by username_1 on 2015-10-16. Score: 2 | Accepted answer

**UPDATE**

As of Smart Map 2.3.0, this is now possible!

> <https://plugins.doublesecretagency.com/smart-map/filtering-entries-by-subfield-value/>

---

**ORIGINAL**

~~Currently, this isn't possible. However, it's a popular feature request which is rising quickly on the priority list.~~

The current workaround (as you noted) is to simply filter the results afterward.


---

