I am trying to create the following flow in Studio, using a repeater, dropdowns and collections, preferably without code if possible.
It’s easy enough when you filter just a single field if the dropdown is connected to the same collection. For example, to filter based on “Food Vendor” I select the “Food Vendor Dropdown” connect it to the “Food Vendor Collection” and set the filter to “Title” and it works great!
However, I want to also filter by location and the problem is that each food vendor has multiple locations associated with it.
I tried creating a different “Location Collection” and then use a multi reference field in the “Food Vendors Collections”
Then I tried connecting the “Location Dropdown” to the “Location Collection” and tried to filter the repeater based on the multi reference field in the “Food Vendor Collection”
But this doesn’t work because, one: dropdown can’t filter based on multi reference fields and two: of course the drop down is now only connected to the “Location Collection”
But I thought it might make the connections behind the scenes, apparently it doesn’t.
(I also tried connecting the “Location dropdown” to the “Food Vendor Collection” and filter based on the multi reference field from there, but again, you can’t filter based on that field)
Another way I tried is creating a third, “Master collection” and then Multi-reference the locations in one field and reference the Food Vendors in another field.
Then I tried all possible ways to connect and display the repeater and dropdowns, but no matter what I do, multi-reference fields can’t connect to any element I tried to use (tables are not an option for me).
Best solution I found that almost works perfectly
The last method I tried, which is kind of working, is using selection tags, I used only one collection, the “Food Vendors”, added a selection tags field and added to each Food Vendor its respective Locations.
I then set the “Location Dropdown” to filter based on selection tags, this works, but the selection tags themselves do not show the real value in the label, they show the default label value as it was dropped from the Add Panel, so the filtering works, but the data is not visualized correctly.
I found no way of connecting the label to the text from the collection tags field,
I am not sure why would i want to connect selection tags (which hold multiple tags) to any other field like title which holds only one data item. It also doesn’t show the correct number of selection tags in each repeater item, which is odd as the filtering works perfectly fine, so again I don’t understand the use case here?
I am not sure why this is so convolved and needlessly complicated, I though several years after collections has been introduced this would be a thing by now. What I would expect to do is simply add a multi reference field or selection tags and just be able to filter based on that, either with dropdown, selection tags or a multi checkbox.
So unless I am missing something here, am I right to assume I must use code for this?
Thanks in advance!