Community

Entity references and uniqueness in attached view

OK, so let's say I have a node for an item for sale, and each item node has an entity relationship to the stores which carry it.

So I want to create a view of items for sale, that has an attached view of the stores that carry the items in the view. My problem is that the stores are duplicated, even if I specify "distinct" in the query settings. It seems the "distinct" is applying to the items, not to the entity reference.

Is there a way to do this that I don't know about? Or is this possibly a bug?

Thanks for your help.

Comments

clarifying what you mean

It's not clear to me what you want to display. Here is an example which seems to show what I think you want. You will see that store S1 is indeed duplicated, but that is because two items (A and B) are sold there, so it should be duplicated.

Item Store
A S1
A S2
B S1

Can you give a concrete example of what you currently see, and what you would like to see on the screen? Then it would be easier to say how to do it.

drupalshrek
Maintainer of the VChess module visible in use at chess website Chesspos.com

Thanks. Using your example, I

Thanks. Using your example, I would like to display a view of the set of unique stores that carry A and B. So in other words, with the data in your example, I would want to display links to store S1 and S2. I would want the screen to display

Items: A, B

Stores: S1, S2

nobody click here