<p>You'll need to approach this in two steps:</p>

<ol>
<li><p>Get all the entries that DO have relationships.</p></li>
<li><p>Filter those entries out of your ElementCriteriaModel, either by using the "not" syntax on the entries <code>id</code> parameter of the <code>craft.entries</code> variable, or by using the <code>without</code> Twig filter in your loop source.</p></li>
</ol>

CC BY-SA 3.0
2015-02-04T00:07:46.773Z
2015-02-04T00:07:46.773Z
Michael Rog
<p>Is there a simple way to find entries that do not have a relationship with another channel? I see similar questions <a href="https://craftcms.stackexchange.com/questions/603/how-to-find-entries-with-no-category">here</a> and <a href="https://craftcms.stackexchange.com/questions/739/displaying-entries-that-are-not-related/766#766">here</a>, but neither seem to work in this context (or I don't know how to adapt their answers).</p>

<p>I have 3 channels, 'accounts', 'clubs' and 'subscriptions'. Every 'subscription' has a required entries field (limit 1) for 'account' and 'club'. In this case, I'm trying to find 'accounts' that are not associated with a club (i.e. do not have a 'subscription'). Sounds like it should be easy, but not finding an answer.</p>

<p>Looking for something like <code>{% set params = params | merge({ not relatedTo : subscriptions }) %}</code>, which obviously doesn't work. I'm using merge because there may be other criteria as well (such as account status, etc).</p>

<p>Any ideas? Thanks.</p>

<relations>
How to find entries that are not related?
# How to find entries that are not related?

(Asked by: username_0 on 2014-09-30)

Is there a simple way to find entries that do not have a relationship with another channel? I see similar questions [here](https://craftcms.stackexchange.com/questions/603/how-to-find-entries-with-no-category) and [here](https://craftcms.stackexchange.com/questions/739/displaying-entries-that-are-not-related/766#766), but neither seem to work in this context (or I don't know how to adapt their answers).

I have 3 channels, 'accounts', 'clubs' and 'subscriptions'. Every 'subscription' has a required entries field (limit 1) for 'account' and 'club'. In this case, I'm trying to find 'accounts' that are not associated with a club (i.e. do not have a 'subscription'). Sounds like it should be easy, but not finding an answer.

Looking for something like `{% set params = params | merge({ not relatedTo : subscriptions }) %}`, which obviously doesn't work. I'm using merge because there may be other criteria as well (such as account status, etc).

Any ideas? Thanks.

**Tags:** relations


---

## 1 answers

### Answer by username_1 on 2015-02-04. Score: 2 | Accepted answer

You'll need to approach this in two steps:

1. Get all the entries that DO have relationships.
2. Filter those entries out of your ElementCriteriaModel, either by using the "not" syntax on the entries `id` parameter of the `craft.entries` variable, or by using the `without` Twig filter in your loop source.


---

