Filter by text of a field of an entity displayed in a view I have following content types: &quot;Person&quot; and &quot;Publication&quot; and I'm showing the publications using a view on a page, showing title, year, venue and authors. The authors in &quot;Publication&quot; are referenced to &quot;Person&quot; via entity reference.
I added filter criteria so the users visiting the page can search publications based on title, author etc. The problem now is, that the field for searching by author only accepts the author's entity ID. But I want the user to search by a part of the author's name (either the entity title or a specific field in the &quot;Person&quot; entity).
What would be the best way to do this? I tried different ways via contextual filters, relationships and entity reference on the view, but neither of them worked for me, or I made something wrong. Any help would be appreciated!
Entity Reference Fields only store the entity ID. To pull other information about the referenced entity into the Views you need to add the Relationship for the ER field.
It will be called something like Content referenced from field_person.
Once you add that Relationship you unlock new Fields and Filters inside Views that relate to the Person entity.
You can now add (Content) Title Filter that uses the Relationship and it will filter text within the Title Field of the Person Content Type.
Without the Relationship the Title Field/Filter will show information about the Publication, the base type chosen for that particular View.
The same goes for other Fields/Filters. If you make them use the Relationship they will pull information from People CT.
Fields/Filters that only exist on People CT will have the Relationship prefilled, as a requirement (because that data isn't accessible in that View without the Relationship).