How to filter previous 'contacts' in 'introductions'?

I have created a “contacts” collection, and an “introductions” collection, where I keep track of which contacts I have introduced to each other. In the ‘introductions’ collection, I have a ‘contact1’ and a ‘contact2’ field, which are many-to-one relationships to the ‘contacts’ collection.

The problem is that I’m trying to avoid introducing the same people twice. That means that once I’ve selected a ‘contact1’, I’d like to get a filtered list of contacts that haven’t already been introduced to ‘contact1’, that I can then use as ‘contact2’. That is proving to be extremely difficult…

In the “contacts” collection I created 2 one-to-many fields, titled “intros_as_contact1” and “intros_as_contact2”. These list any introductions that contact may have had — either as ‘contact1’ or ‘contact2’.

Then, in the “introductions” collection, I went to the ‘Interface’ settings of the ‘contact2’ field, and setup an initial filter, like this:

Seemed logical: I’m trying to exclude any contacts where the person currently selected as ‘contact1’ was already introduced to them, either as ‘contact1’ or ‘contact2’. But that seems to exclude ALL contacts, and gives me an empty list…

I then tried using just a single clause, to see whether there was an issue with the filter statement itself:

This time I get ONE record in the filtered list: the record for the currently selected ‘contact1’! :man_shrugging:

I now have tried several filtering variations, but whatever I try, I either get an empty list, or a list with only 1 record — the ‘contact1’ record…

Is there an obvious filtering technique that I’m overlooking? Or is there another way to achieve what I’m trying to do, that I’m missing? Any guidance would be greatly appreciated. :folded_hands:

Directus currently doesn’t support using the value as one field in the filter of another so this is indeed quite difficult to achieve with a regular studio filter and/or bookmark :thinking: I’ve jotted down your comment on the feature request on our end to track this. In the meantime, lets see if we can crowdsource some workarounds!