Answers.Body: <p>You can do it like <a href="https://craftcms.stackexchange.com/q/129/125">explained in this answer</a>, only that you also add your dropdown field parameter to your <code>craft.assets</code> criteria model:</p>
  
  <pre><code>{% set assets = craft.assets.docType('A').limit(null) %}
  </code></pre>
  
  <p>and then:</p>
  
  <pre><code>{% set entries = craft.entries.section('articles').relatedTo({
      targetElement: assets,
      field: 'documents'
  }) %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-09-04T12:22:17.213Z
Answers.Text: Works perfectly! Thx so much :)
Answers.UserDisplayName: migmaker
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-09-04T06:17:30.043Z
Answers.LastActivityDate: 2015-09-04T06:17:30.043Z
Answers.LastEditDate: 2017-04-13T12:51:00.253Z
Answers.UserDisplayName: carlcs
Body: <p>OK so I got entries <code>articles</code> with an asset field <code>documents</code>.<br>
  This asset field has an attribute called <code>docType</code> which is a dropdown with 5 values (A, B, C, D, E).  </p>
  
  <p>I d like to select all <code>articles</code> entries that have <code>documents</code> with <code>docType=A</code> criteria.</p>
  
  <p>How can I dot that?<br>
  Should I make a <code>relatedTo</code> selection?
  I tried multiple things but nothing works.</p>
  
Tags: <entries><elementcriteriamodel>
Title: Select all entries with asset field attribute criteria
ThreadText: # Select all entries with asset field attribute criteria
  
  (Asked by: username_0 on 2015-09-04)
  
  OK so I got entries `articles` with an asset field `documents`.  
  This asset field has an attribute called `docType` which is a dropdown with 5 values (A, B, C, D, E).
  
  I d like to select all `articles` entries that have `documents` with `docType=A` criteria.
  
  How can I dot that?  
  Should I make a `relatedTo` selection?
  I tried multiple things but nothing works.
  
  **Tags:** entries, elementcriteriamodel
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2015-09-04. Score: 1 | Accepted answer
  
  You can do it like [explained in this answer](https://craftcms.stackexchange.com/q/129/125), only that you also add your dropdown field parameter to your `craft.assets` criteria model:
  
  ```
  {% set assets = craft.assets.docType('A').limit(null) %}
  
  ```
  
  and then:
  
  ```
  {% set entries = craft.entries.section('articles').relatedTo({
      targetElement: assets,
      field: 'documents'
  }) %}
  
  ```
  
  > **Comments:**
  > **username_0**: Works perfectly! Thx so much :)  
  
  ---
  
  