Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2015-10-16T17:42:13.087Z
Answers.LastActivityDate: 2021-01-01T06:24:59.813Z
Answers.LastEditDate: 2021-01-01T06:24:59.813Z
Answers.UserDisplayName: Lindsey D
Body: <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>
  
Tags: <elementcriteriamodel><filter><plugin-smartmap>
Title: Filtering/Searching fields with enumerated data (e.g. Smart Map) in an ElementCriteria model
ThreadText: # 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.
  
  
  ---
  
  