By drupalfriend123 on
Hi,
I have field collection field "MyProducts". I added 3 field items to the field "field1, field2, field3".
I would like to create a view with field2 and field3 only. When I add field in view, I dont see field collection items in add field page. I only see the main field collection field. In this case, myproducts. How can I create a view with field2 and field3?
Thanks.
Comments
Re: How to select specific field collection item in views
Please add relationship of "MyProducts" field in your view and then you will able to add its field let say field1, field2, etc.
Thanks
My content type has field1,
My content type has field1, field2, fieldcollectionfield.
fieldcollectionfield has 3 fields (F1,F2,F3)
In views table page, I added field1, field2.
Added relationship > selected fieldcollectionfield. > selected checkbox require relationship.
Now, how would I just add F1 to the views table?
Answer to, "How would I just add F1 to the views table?"
The following steps assume you're in the admin page for your view and editing a page or a block. This will likely also work for other view types, but I've only done this successfully with blocks and pages.
Thanks
Frolicing as we speak. :) Thanks for the step-by-step.
duplicates?
Leistiko - this worked beautifully, accept for any instance that we had multiple entries added to the field collection, a duplicate version of that Node was generated. Marking the Query setting 'distinct' did not solve this. Did you run into this issue?
I have not encountered that
I have not encountered that issue (yet!). The only thing I can think of off the top of my head is rebuilding registries and clearing caches to see if the situation persists afterward. If any clever "real" solutions come to me, I'll post 'em here.
Thank You leistiko_texvet
I, too, am frolicking with joy. Thank you.
And thank you from me
Was just about to give up on using field collections, when I found your post. You are a gentleman and a scholar sir, thank you.
duplicate values in field collections in views
For me the problem resolved after removing the option "show all values in the same line" and works now link a charm.
In other words ... Fields -> [your field to your field collection] ->multiple fields behavior -> remove the option "show all fields in the same line"
duplicate values in field collections in views
For me the problem resolved after removing the option "show all values in the same line" and works now link a charm.
In other words ... Fields -> [your field to your field collection] ->multiple fields behavior -> remove the option "show all fields in the same line"