Answers.Body: <p>You’re just missing the <code>:</code> at the end of <code>:notempty:</code> in your second example. This will work:</p>
  
  <pre><code>{% set params = { section: 'sectionName', customField: ':notempty:', limit: 10} %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-10-09T08:40:04.820Z
Answers.Text: Thank you. Is there any documentation on this? Similar example here: http://craftcms.stackexchange.com/questions/452/return-entries-where-field-is-not-empty
Answers.UserDisplayName: Clive Portman
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-10-08T18:22:05.800Z
Answers.LastActivityDate: 2015-10-08T18:22:05.800Z
Answers.UserDisplayName: Brandon Kelly
Body: <p>The following returns entries correctly:</p>
  
  <pre><code>{% paginate craft.entries.section('sectionName').customField(':notempty:').limit(10) as products %}
      {% for product in products %}
          {% include 'incs/_productSnippet' %}
      {% endfor %}
  {% endpaginate %}
  </code></pre>
  
  <p>But the following returns empty:</p>
  
  <pre><code>{% set params = { section: 'sectionName', customField: ':notempty', limit: 10} %}
  {% paginate craft.entries(params) as products %}
      {% for product in products %}
          {% include 'incs/_productSnippet' %}
      {% endfor %}
  {% endpaginate %}
  </code></pre>
  
  <p>It's the latter I'm after because the customField I want to check varies. Removing the <code>customField: ':notempty',</code> from <code>params</code> in the second example returns entries, so I'm guessing it's the way I'm using customField within <code>params</code>?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-10-08T15:39:48.967Z
Comments.Text: Seems you're missing the closing colon `:notempty:` in the 2nd example.
Comments.UserDisplayName: Brad Bell
Tags: <entries><custom-field><params>
Title: How to check custom field not empty within params?
ThreadText: # How to check custom field not empty within params?
  
  (Asked by: username_0 on 2015-10-08)
  
  The following returns entries correctly:
  
  ```
  {% paginate craft.entries.section('sectionName').customField(':notempty:').limit(10) as products %}
      {% for product in products %}
          {% include 'incs/_productSnippet' %}
      {% endfor %}
  {% endpaginate %}
  
  ```
  
  But the following returns empty:
  
  ```
  {% set params = { section: 'sectionName', customField: ':notempty', limit: 10} %}
  {% paginate craft.entries(params) as products %}
      {% for product in products %}
          {% include 'incs/_productSnippet' %}
      {% endfor %}
  {% endpaginate %}
  
  ```
  
  It's the latter I'm after because the customField I want to check varies. Removing the `customField: ':notempty',` from `params` in the second example returns entries, so I'm guessing it's the way I'm using customField within `params`?
  
  **Tags:** entries, custom-field, params
  
  > **Comments:**
  > **username_1**: Seems you're missing the closing colon `:notempty:` in the 2nd example.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2015-10-08. Score: 3 | Accepted answer
  
  You’re just missing the `:` at the end of `:notempty:` in your second example. This will work:
  
  ```
  {% set params = { section: 'sectionName', customField: ':notempty:', limit: 10} %}
  
  ```
  
  > **Comments:**
  > **username_0**: Thank you. Is there any documentation on this? Similar example here: http://craftcms.stackexchange.com/questions/452/return-entries-where-field-is-not-empty  
  
  ---
  
  