Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm creating a customer extranet for my client. The users are my client's customers. Within the body of a page node, I need to display the ID of the customer (company) to which the current user belongs.

Here's how I've set it up so far:

  • Drupal 7
  • I have a Customer content type that has a field called customer_id (among other things).
  • I have added a node-reference field to the User fields that references one Customer node. (In other words, each user is associated with one Customer.)

So in his profile, the current user has a node-reference value pointing to a Customer node, and I need to retrieve and display (in a page node or block) the value of one field (customer_id) in the Customer node being referenced in the current user's profile.

I've been going through several Drupal books and whatever module documentation I can find, and I've been experimenting with various views using the the Views module, but I'm still pretty stymied. Can somebody point me in the direction of a good way to implement this?

Thank you for your help!


share|improve this question
Will anybody respond to this? Thanks for your help!! – ctlarsen May 30 '11 at 13:19
up vote 1 down vote accepted

You should be able to do this through Views arguments, with the nid of the customer node as the argument. Then that node's fields should be available to you from there.

share|improve this answer
Thank you, jamesgrobertson! I appreciate your help. – ctlarsen Aug 22 '11 at 13:54

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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