I'm having problems filtering a view. This is my case:

When a user registers he has to select some suppliers of a list (This is a term reference as a field of my user).

A user can also create a product. Now I would like to show the products where the suppliers reconcile.

This is an example:

USER 1 has suppliers A & B.
USER 2 has supplier A.
USER 3 has supplier B.

USER A can see the products of USER 2 and USER 3.
USER B can see products of USER 1, but NOT USER 3.
USER C can see products of USER 1, but NOT USER 2.

But I'm having trouble making this filter in a view. Could someone help me on my way on how to make this?

1 Answer 1


If the Supplier field lives in the user profile you could make the Product fields dependent on the Supplier field using the Conditional Fields module, grant various roles field/taxonomy term access to Product fields using the Field Permissions or Taxonomy Permissions module, and then create a rule that fires based on Supplier field values that modify user role assignments accordingly

Then you would add all Supplier and Product fields to your view, hiding each Product field in the display, and then add a Global: Custom text field called "Products" and use replacement patterns to reference each of the hidden fields one after the other. (Make sure the hidden fields appear before the Global: Custom text field.) Anything that comes up empty simply won't appear.

If those fields live in a node, that may require a slightly different strategy, but the idea should be more or less the same.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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