Body: <p>I'm trying to get a list of entries that have at least one asset in it (standard assets field) called "assets".</p>
  
  <pre><code>{% for entry in craft.entries.section('banks').first.assets.filename(':notempty:').limit(2) %}
  &lt;p&gt; {{ entry.title }} 
  {% endfor %}
  </code></pre>
  
  <p>It don't show anything, no errors either.</p>
  
  <p>Please advice.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-01-29T15:49:23.943Z
Comments.Text: Mark, I already asked this question here: ["How can I get only those entries with non-empty assets field"](http://craftcms.stackexchange.com/q/129/125). Hope this helps!
Comments.UserDisplayName: carlcs
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-01-29T17:03:31.297Z
Comments.Text: Thanks but none of the snippets work for me. Is my piece in the initial question wrong?
Comments.UserDisplayName: Mark H.
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-01-29T17:15:07.973Z
Comments.Text: Yes, it's wrong. You do it with the `relatedTo` parameter, see the answer I accepted.
Comments.UserDisplayName: carlcs
Tags: <assets><custom-field><order>
Title: Display only those entries that have assets
ThreadText: # Display only those entries that have assets
  
  (Asked by: username_0 on 2015-01-29)
  
  I'm trying to get a list of entries that have at least one asset in it (standard assets field) called "assets".
  
  ```
  {% for entry in craft.entries.section('banks').first.assets.filename(':notempty:').limit(2) %}
  <p> {{ entry.title }} 
  {% endfor %}
  
  ```
  
  It don't show anything, no errors either.
  
  Please advice.
  
  **Tags:** assets, custom-field, order
  
  > **Comments:**
  > **username_1**: Mark, I already asked this question here: ["How can I get only those entries with non-empty assets field"](http://craftcms.stackexchange.com/q/129/125). Hope this helps!  
  > **username_0**: Thanks but none of the snippets work for me. Is my piece in the initial question wrong?  
  > **username_1**: Yes, it's wrong. You do it with the `relatedTo` parameter, see the answer I accepted.  
  
  ---
  
  ## 0 answers
  
  