I have a Product collection that has several multi-reference fields for the product attributes (‘material’, ‘certification’, etc). Each of these fields has its own collection. I want to list the Product in a repeater including all the reference fields. Following the movies/actors and songs/singers tutorial I manage to display the products, HOWEVER the multi-reference fields only shows 1 value even when that product has several values in that field. For example, if the ‘material’ column has ‘Bamboo’ & ‘Plastic’ in the ‘Product’ collection, the repeater only shows ‘Bamboo’. Same goes for the other multi-reference fields.
This is how I set up the dynamic page:
-
Connect the repeater to the dynamic dataset ‘Product’. Connect elements such as image, title, etc to the corresponding fields in the ‘Products’ collection.
-
Add a dataset ‘#dsMaterial’, connect it to ‘Material’ collection, set the Filter as follows:
Field: Product (Product) – this is the automatic field created by Wix in ‘Material’ collection
Condition: Includes
Dataset: Product
3. Add a text element, connect it to the ‘#dsMaterial’, connect the text to the ‘Title’ field.
Is there anything missing in my set up? Since a multi-refence fields contains an array, should I do some processing to convert this array to string? If yes, how do I grab the array value? ‘itemData’ variable inside the repeater’s onReady() doesn’t have this data.