1

I am trying to use views fetch the News and Articles for display on my custom content type "Industries". On Industries content type I have node reference fields to the News and Articles content types.

I've added two relationships in 'advanced' section and in Contextual filter selected Content: NID. I also enabled Distinct > pure distinct settings in the query settings section. View's Snap are Here : http://prntscr.com/b8mrmp

But still the records are repeating. If 6 news and 10 Articles, then each article is listed for each news node. Result : http://prntscr.com/b8mscg

  • need to required relationship in this view. check "Require this relationship" – vgoradiya May 26 '16 at 11:29
  • i applied this technique but no luck – Esar-ul-haq Qasmi May 26 '16 at 11:39
  • Can you provide the details of your two relationships? The problem comes from there, but the solution depends on how they are setup. – acrosman May 26 '16 at 13:16
  • @acrosman i am using two Custom Content types (News and Articles) in relationships in advanced section of the view. these are included in snap shots above. – Esar-ul-haq Qasmi May 27 '16 at 6:18
  • @Esar-ul-haq Qasmi is the details of how you setup those relationships (are they two different fields, are they chained, etc) that would helpful to providing direction. – acrosman May 27 '16 at 12:52
0

Have a look at the Views Distinct module. From its project page:

Relationships or other joins in Views often create "duplicate" results. For example, a node with a field that has multiple values may show up in the View once per value in the multi-value field. It's frustrating, and the "DISTINCT" SQL query option in the Views UI does not actually solve the problem because the result row is technically distinct. This module aims to give a simple GUI method to remove or aggregate these "duplicate" rows.

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.