I'm using Views to display lists of CiviCRM contacts (4.5.2). I'm finding that several contacts appear in Views twice. Any ideas what might be going on here?
The culprit is often the website field which has no filters that enable you to specify which of a number should show and hence they produce multiple rows. But like others say, it could be Address, Email or Phone if you haven't specified either the location type or Primary only. Or multiple relationships etc.
Why this is happening depends very much on how your View is set up, providing an export of the View might help us investigate.
One thing that might help is turning on the 'Distinct' option in the View, to force only one of each result appearing.
This can be done whilst editing the View, under: Advanced > Other > Query settings > Tick 'Distinct'
If you use adress fields and the contact has several addresses in CiviCRM the contact will be shown several times. In that case you could configure the address fields to only show the primary record.
There is a work-around for this. Take the example of multiple phone numbers in a contact record.
- Include the Phone Number field once for each unique type of number (Home/Mobile, Home/Phone, Work/Phone etc)
- In Civicrm Location Display Options for each field, select unique combinations (e.g. Location Type = Work & Phone Type = Phone). Do NOT select "Show only Primary record"
Mark each of these fields as "Exclude from Display", and add a Rewrite Results for each one followed by a comma (e.g. Rewrite as "[phone],"
Add a "dummy" field AFTER the Phone Number fields, using any unused CiviCRM field (e.g. PostCode Suffix) and in this change the Label to e.g. "Phone Number(s)" and the Rewrite Results to "[phone] [phone_1] [phone_2]" (or whatever the PN fields are called).
The result should be one line in the output per contact, and the multiple phone numbers will be concatenated in the Phone Number(s) column.
Hope this works for you. Tom C
Unfortunately, I believe in my case because I was using Household relationships and Addresses of Employers this caused a lot of duplicates.
What did work for me was to set Aggregation on. Then setting Group by on your main element that you wish to not duplicate. Viola all is well!