Office is content type
User accounts have a Node reference to Office, field_office.
I need to create a view which displays
I can't believe something this simple is so difficult to setup. I've setup another view where
Project->field_office. In that case I created two relationships:
Field: Office (field_office) Content: Office (field_office) - reverse (to User)
And a Contextual Filter
(field_office) User: Uid
Where the default value is current logged in user's uid.
That was easier since both fields are the same (field_office). But I can't figure out how to link a field to a Content nid.
It would be simple if I could just create a Contextual filter on Content: nid and set the default value to User: field_office. I can't figure out how to do that though. The only contextual filter option which might support that is PHP code, but what would I tell it to return? This doesn't seem to work (breaks AJAX)
$user_data = user_load($user->uid); return $user_data->field_office['und']['0']['value'];