Contextual view -> entity reference target ID I have the following situation:

I have 2 content types (session and preformance)

Performance has an entity reference to session 

I want to create a view that shows me all performances for the session that is referenced by the performance i am looking at right now.

So this is a contextual view that filters on the nid of the performance, and has a relation to the session that is referenced by the viewed performance.

I cannot get the target_id of the session (from field_session on content type performance) to be passed in as a contextual filter.

I tried to use %node:field_session, but that gives me the label of the session, and not the target_id.

I also tried to change the display of the performance content type->field_session to 'entity id', but no luck.

All suggestions are very welcome.
You need to add the proper Context to the variant.



Then you complete the setup.



And lastly you select it in the panel settings for the Contextual view: