Question: I have two similar content types on a Drupal 8 site: *groups* and *projects*. *Groups* can have child projects, but a project does not necessarily have a parent group. I have an entity-reference field on the *Project* content type, where a parent group can be added.

However, as I am setting up many different views, I would like these child projects to be added to the *Groups* nodes when users add parents to the *Project* nodes. In other words, I want to automatically update the field "Projects" on the related node of the "group" type.

How would I go about doing this? I see most people recommend showing a block on the node, but I would like to use this field in various views, so that won't work.

Answer: 
So if I undersand you don't have any relation Groups -> Projects? You just have a relation Projects -> Groups (that you also call parents)? .
And you want to show by views, Groups and their children (projects)?

If this is what you want you have several choices.

* Add many relationships in the view advanced filters in order to reach groups projects, (could be tricky).
* Add a field entity relationship Groups -> project that you programmatically set on every projects insert/update/delete. Thanks to this it would be much more easier to build a view.
* create your own custom block, with your dedicated SQL query. listing all children of a group and attaching this block to all "groups" content type pages.
I don't think that create two references is a good option when you only need one in the project content type.

If you want create a view to show all the project of a group you should add in the view a Contextual Filter to the `field_related_research_group` field. If you want to show the view in a Group node page then you can chose the **Provide default value** option and as type **Content ID from URL**.

[![enter image description here](https://i.stack.imgur.com/dIT9J.png)](https://i.stack.imgur.com/dIT9J.png)

In your Filter Criteria the content type must be project.