Hello,
The issue title may be a bit confusing so let me explain.
I face no problem creating the node: the issue occurs when editing it.

Step 1:
In a node, I have a user reference field (limited to 1 choice) but I need these users to be part of a specific role.
So I created a view based on users, filtered on the required role and then use that view on the node user reference field.
So now, in the node, the user reference field dropdown widget only list users of the filtered role.
Note: this node referenced user has no relation with node's author.

So far so good, thank you for the module ;-)

Step 2:
Now, these users can be referenced only once.
But, if I do so by filtering the view, I have a problem when I'm back editing a node with a referenced user already set: the list shows unreferenced users but it doesn't list the node's referenced user (because that user is being already referenced by the current node itself).

How can I list unreferenced users and currently referenced user (if set)?

Maybe an example to sum up things:
I have 2 users of the required role: UserA and UserB,
2 nodes with an empty user reference field: Node1 and Node2,
and a view displaying all users of the required role but already referenced ones.
a. Edit Node1: the user reference field shows None, UserA and UserB - Choose UserA
b. Edit Node2: the user reference field now shows None and UserB because UserA is referenced in Node1 - Cancel editing
c. Edit Node1 again: the user reference field only shows None and UserB because UserA is referenced in Node1 itself - I'd like to have it showing UserA (and that item to be selected).

Many thanks

Comments

PhilY’s picture

Issue summary: View changes