0

I wonder why these results don't merge. This is the result of searching by postcode. As you can see it returns 2 times the same shop with another deal. I need it to return the shop once with both deals on it. Thanks in advance! Pictures below:

detail

enter image description here

2 Answers 2

2

Found two modules that might help with your issue:

Views Merge Rows - provides a way to combine rows with the same content in the specified fields.

OR

Views Fields Combine - Similar to the one above, but hasn't been updated since 2012.

Experiment and see which one works best. You may need to use Rewrite Option too.

5
  • Let me know which one works for you. May have a project that needs this feature too. Commented Mar 30, 2015 at 19:45
  • None works. Can't just merge the first two fields only it's all or nothing. I'm just grouping them atm Commented Apr 9, 2015 at 12:36
  • Did you make sure that Distinct is chosen in the Query for Views? If that doesn't work, you can try this one link . Commented Apr 10, 2015 at 9:37
  • i have that installed already :/ still doesn't work. I tried the Distinct in Query settings but still displays duplicates Commented Apr 26, 2015 at 22:56
  • These timers make it impossible to aggregate. if I check the Distinct in Query Setting and set Aggregation on yes, it filters the duplicates but then they're completely removed. That's too much. Commented Apr 26, 2015 at 23:11
0

"You can apply GROUP BY or DISTINCT by enabling views aggregation settings to remove duplicate records.

  1. Go and edit your view
  2. In Advanced » OTHER section by enabling Use aggregation: Yes
  3. In FIELDS or FILTER CRITERIA section, select and apply Aggregation settings for which fields you want to group by or distinct."

Taken from: How do I remove duplicates when using the random sort?

1
  • If I follow your instructions it results nothing. Aggregation: yes, Group results by ... also an instant SQL error SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AS field_data_field_logo_, location.name AS location_name, location.postal_code ' at line 1 Commented Mar 20, 2015 at 15:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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