0

I have several node types (merchandise vendor, food vendor, festival vendor) which all have an embedded field collection called equipment, which can contain multiple values. The field collection has a taxonomy field called event and some others.

For example, a merchandise vendor can have equipment for event 1 (a taxonomy term), and different equipment for event 2 (a different taxonomy term).

My view can sort out the vendors for event 1 just fine. I can include the equipment for the events in the view, but I can't seem to filter it to just event 1.

I want to be able to visit the view page for event 1, and have it show all the vendors for event 1, and the equipment each vendor needs for event 1. Right now, it shows all the equipment for the vendor for all the events.

Is there a way to filter a field collection in a view?

4

You can create a Relationship to the field collection, and then you'll have access to all the field collection's fields within the collection from both "Fields" and "Filters".

  • I added the relationship to the field collection, and all the collection's fields are available in fields and filters. If I add the relationship to the contextual filter, then I can't get vendors for event 1 who don't have equipment for event 1. Without the relationship in the filter I get them, but I also get their equipment for event 2, when I only want event 1. – Michael Mar 11 '14 at 21:50
  • 1
    Have you tried messing with the delta on the relationship? – Renee Mar 11 '14 at 22:04
  • 1
    The delta is "All." If I take the relationship away from the contextual filter and set the delta to 1, it seems to work. This is entirely unintuitive. – Michael Mar 11 '14 at 22:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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