List Entries in a section that are referenced as a relation in another I have a list of entries and I would like to filter them into 2 lists.


Entries that have been made a relation in another section
Entries that have NOT been made a relation in another section


I thought about tackling this the other way round and listing the section with the relations but some entires are related multiple times, so and the titles in the list get repeated multiple times. Unless this can filter out the duplicates, but it starts to get messy at this point. 

Ideas welcome thanks.
You could use the without filter for this:

{% set entryParams = {
    section: mySection1
} %}

{% set relationParams = {
    sourceElement: mySection2,
    field: myEntriesField
} %}

{% set entriesWithRelation = craft.entries(params).relatedTo(relationParams).find() %}
{% set entriesWithoutRelation = craft.entries(params)|without(entriesWithRelation) %}