Answers.Body: <p>I Think this should work:</p>
  
  <pre><code>{% for entry in craft.entries.section('team').limit(1).order('RAND()').schedulerBio(':notempty:') %}
     ...stuff
  {% endfor %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-08-17T01:03:06.843Z
Answers.Text: Thanks so much! That worked perfectly. I had not tried notempty.
Answers.UserDisplayName: glider
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-08-17T00:16:40.807Z
Answers.LastActivityDate: 2016-08-17T00:16:40.807Z
Answers.UserDisplayName: AbbeyDesign
Body: <p>I'm trying to select 1 random entry out of a section based on whether a field has content (<code>schedulerBio</code>). I can get all the entries based on the conditional but can't seem to randomize a single selection. Any help would be appreciated. </p>
  
  <pre><code>{% for entry in craft.entries.section('team').limit(1).find() if entry.schedulerBio|length %}
  ... stuff
  {% endfor }
  </code></pre>
  
Tags: <templating><random>
Title: Selecting a random entry based on conditional
ThreadText: # Selecting a random entry based on conditional
  
  (Asked by: username_0 on 2016-08-16)
  
  I'm trying to select 1 random entry out of a section based on whether a field has content (`schedulerBio`). I can get all the entries based on the conditional but can't seem to randomize a single selection. Any help would be appreciated.
  
  ```
  {% for entry in craft.entries.section('team').limit(1).find() if entry.schedulerBio|length %}
  ... stuff
  {% endfor }
  
  ```
  
  **Tags:** templating, random
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-08-17. Score: 4 | Accepted answer
  
  I Think this should work:
  
  ```
  {% for entry in craft.entries.section('team').limit(1).order('RAND()').schedulerBio(':notempty:') %}
     ...stuff
  {% endfor %}
  
  ```
  
  > **Comments:**
  > **username_0**: Thanks so much! That worked perfectly. I had not tried notempty.  
  
  ---
  
  