I'm currently work on a site that manages retail stores and visits made by salespeople to those stores.

I have the following two content types:

contains basic store information: address, phone number, etc

Sales Survey:
date of sales call
general info gathered on call
Entity Reference to the Store

I'm currently working with panels to create a custom display for the store content type and I would like to include a section showing the 5 most recent sales calls made to that store and the information about that call.

I've been trying to create a content pane in views to include in the panel for the store node display, but I can't figure out how to access all Sales Surveys that reference the store that is currently being displayed.

Any thoughts?

I'm using:
Drupal 7
Views 3
Entity Reference

Let me know if I can provide further clarification, I think part of my problem is just in wrapping my mind around all the things I'm trying to bring together and I'm still very new to Drupal. Maybe I'm going at this in the wrong way?

Any help is appreciated!

1 Answer 1


First, you need to create a view (probably block display) of the sales surveys, with a contextual filter. Create a new view of Sales surveys, with a block display. Add whatever fields you want to the display. Then, open the "advanced" tab, and add a contextual filter:

  • choose the field that you've named as the entity reference to the store
  • provide a default value -> "content ID from URL"

Once you save that view, go into panels, and add that view to the page you are creating for the stores.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.