Hi, my goal is to filter the content in a repeater based on category, as user-input in a dropdown. Another dropdown is filtering the same content by another property without problem.
I have read and followed several similar approaches here in forum, without luck. My guess is the problem has to do with category values in my primary collection is connected to another collection.
My JavaScript skills are very basic and I am new to Code.
SETUP
- Practices collection with content, where #practiceCategory is connected to #categoryTitle in Category collection
- Categories collection with only #categoryTitle
- #dataset2: Practices collection
- #dataset4: Categories collection
- Repeater connected to #dataset 2
- #iCategory dropdown values connected to "dataset4
ISSUE
See screenshot below.
Currently I am close to a solution. #dataset2 is set up with default filter #practiceCategory same as #dataset4, and #categoryTitle in #dataset4 is set with iCategory_change action. The filtering works, but the content is already filtered at page load, which is really puzzling me as #dataset4 is not filtered by default.
PREFERRED SOLUTION
Directly filter #practiceCategoy in #dataset2, without relying on #dataset4 as intermediary, even though #practiceCategory is connected in collections. Is this possible now or in near future?
ALTERNATIVE 1
Remove default ‘same as’ filter on #dataset2, and instead apply this filter as part of iCategory_change action. I could not find the ‘same as’ commend to do this.
ALTERNATIVE 2
Remove the puzzling default filter on #dataset4 at page load. I tried this in different ways and one is the onReady function in screenshot. No luck.
I am very open to all suggestion!!
BTW. I am starting simple, and in the future want to filter based on different concurrent user inputs - in case that is relevant in choosing a solution for this.