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 }

1 Answer 1


I Think this should work:

{% for entry in craft.entries.section('team').limit(1).order('RAND()').schedulerBio(':notempty:') %}
{% endfor %}
  • Thanks so much! That worked perfectly. I had not tried notempty.
    – glider
    Commented Aug 17, 2016 at 1:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.