I would like to create a View that displays users associated with a certain nid.
Under contextual filters, I have checked Content: Nid and selected
Provide a default value - Content ID from URL
Under Relationship, I have selected
Entity Reference: Referencing entity
Then under Fields, I have selected
(User referencing Content from field_office) User: First Name (First Name)
(User referencing Content from field_office) User: Last Name (Last Name)
But nothing is being displayed when I type in my nid into Preview with contextual filters
Essentially what I am trying to do is perform the following query:
$args = array(':nid' => $node->nid);
$results = db_query('SELECT USER_ID FROM USER INNER JOIN node ON USER.OFFICE_ID =
node.title AND node.nid = :nid', $args);
I have done this before, but accidentally deleted the View. Now I am unable to make the View again, thought the DB structure has not changed at all.
Could someone please point out what I'm missing?