Hi,
I was wondering if its possible to use other fields of the filtering view to populate the relation not only with the endpoint but also its fields.
Example:
A product X exists and is distributed by N companies, (company-> distributes-> product).
When creating a node purchase, yo have to select the products (relation purchase->has->product)
When listing the products, they display the companies that distribute them.
When you select, you select the product by the company you want you want to distribute, you add the product to the endpoint and the company to a relation's field.
Is that possible and/or dificult to implement?
Thanks in advance...
Comments
Comment #1
nwom commentedEven though this is an old issue, I'm sure it will help others looking for similar functionality.
This can be done using Views Contextual Filters. The views contextual filters will only work with the Relation Select subform after having already applying the following Views module patch: #2358049: Contextual filter - Provide default value - Content ID from URL not working on ajax requests
So basically, you have to have the following (assuming you know your way around Views contextual filters and relationships):
Now, the results that will be populated will be limited to the Company's products.