Problem:
Customer has a many to many relationship between 2 CPT and a repeatable group within one of them. He created a view for the repeatable group and wants to be able to use a view from the parent of the repeatable group inside the loop. Similar to a parent of a parent scenario since the repeatable groups are considerable child of the CPT they belong to.
Solution:
Upon further review, our 2nd tier support team was able to find a solution.
First, it was necessary to edit the ECD Events view as it needs a post relationship query filter that limits the output to events that belong to some location.
Ordinarily we'd set the filter to show posts related to the post where the View is shown or to the current post in the loop, but that's not going to work here, because the main View is querying ECD Participation repeating groups and not locations.
So the query filter should specify that the parent location will be specified by a shortcode attribute(please check the screenshot bellow).
Then, where the View to output the ECD Events is inserted, we need to pass the ID of the "current" Location via the wpvrelatedto shortcode attribute. And we can get that ID by employing the item attribute to shift the context from the current ECD Participation post to its parent Location, it will look like this:
[wpv-view name="ecd-events-at-location-pin" wpvrelatedto="[wpv-post-id item='@ecd-participation.parent']"]