0

I have a content type with a field image and a field file. I made a simple view to get all items of that content. I included in my view a relation ¨File Usage: File¨ to get some data like file size, upload date and uri of file field and for using VBO to download all files.

Now Im getting duplicate results, all data (file size, upload date, vbo) for image field and the same for file field when I just want to get the information for the file field, the image is just a thumbnail. Any ideas of how to get real results over duplicates?

2
  • And checking "reduce duplicates" in the Views advanced settings doesn't help?
    – beth
    Mar 8, 2014 at 0:56
  • Nop, I already tried but remains duplicated
    – yuki
    Mar 8, 2014 at 0:59

2 Answers 2

1

You need to add a File relationship for a specific field, not a File Usage relationship.

In the options for 'Add relationships' select the 'File' filter and you should see an option for each field e.g. 'File: Content using My Field'. Use this and it will give you the same data (file size etc.) but just for files attached to that field.

3
  • Excellent! it works like a charm! thank you very much, its very useful for all my projects. Thank you again!
    – yuki
    Mar 9, 2014 at 5:05
  • I'm having this issue on a view for a content type with a File field and an Image field, I don't see a 'File: Content using My Field' option. When I use the File filter the only option I get is File: Usage
    – nexus_6
    Sep 24, 2014 at 14:52
  • Should probably mention that you need to add the File:Usage relationship first for the other options to show up and you need to 'require this relationship'. That was the only way I could avoid duplicates.
    – nexus_6
    Sep 24, 2014 at 15:00
1

You can use aggregation settings to yes.

  1. Go and edit your view
  2. In FIELDS or FILTER CRITERIA section, select and apply Aggregation settings for which fields you want to group by or distinct.

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.