Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Every CCK field is available in Views as a regular formatted field and as 'data', listed like this in the UI:
'Content: Foo (field_foo) - data'
If this is a multiple value field, adding it produces multiple rows -- it would be useful to warn the user of this in the UI, say in the field description. Would potentially save head-scratching / hair-puling!
Comment | File | Size | Author |
---|---|---|---|
#7 | filefield_data_views_help.patch | 879 bytes | quicksketch |
Comments
Comment #1
joachim CreditAttribution: joachim commentedActually, it looks like this is only filefields. Reassigning.
Comment #2
quicksketchThanks sounds like it might be a bug in the data retrieval. I've seen this happen when joining on the NID instead of the VID (which is what everything else uses in CCK). There should be a way to prevent that sort of behavior I believe, which would be better than a warning probably. :-)
Comment #3
quicksketchHmm, well upon further inspection it's not a bug in data retrieval at all. Additionally this is completely expected behavior if you do anything with the attached files (such as pulling out MIME type or file size). So a message might be appropriate, but I don't think a big warning is necessary and I can't really find a suitable place to put it otherwise. I'm not sure this will be changed.
Comment #4
walker2238 CreditAttribution: walker2238 commentedIs there a reason why it can't be grouped like other file fields to prevent duplicates?
Comment #5
quicksketchYou can group them if you like, but Views will group them by NID, not by FID (unless you're building a view of type "File"). I'm marking this won't fix, since it's just the way SQL and Views work.
Comment #6
joachim CreditAttribution: joachim commentedViews core fields for Taxonomy has this description text:
How about something similar here?
Comment #7
quicksketchI applied this patch which gives the "data" field a description similar to taxonomy.
Comment #9
mitadon CreditAttribution: mitadon commentedI had a day of head-scratching with duplicating rows with multiple fields, untill i found the solution - I realized that i've used 2 multiple fields one of which was shown in a table with appropriate settings (show as single line). Another was hidden for using in expression, so i didint pay enough attention to its multiple field settings, what resulted duplicating rows. Actually int's not related with FileField, just double check all multiple fields settings.