I have a search page where I am using drop down menus to apply filters. It is for teacher resources, so one filter is for grade level, and the second is for subject and the subjects are filtered by grade level. I am trying to figure out how to have all of the subjects show up when there is not a specific grade selected. I achieved this by adding an “all grades” to my grade level option set, and then add “all grades” to the “grade level” attribute of each subject. Now my problem is that my repeating group is set up to show only the resources that contain the grade level selected in the grade level dropdown in their field “grade level,” so that rather than showing all resources when “all grades” are selected" it shows nothing. Please help!
What I would like is if the blank space a the top of the option set which functions as an “all” option, could actually state that, and then have the effect of not filtering the subject drop down menu.
You can use an option set with attributes. Simply, you will create a Grades option set with Value attribute. You will have All as the first option, with no value. Then, the other grades will have the corresponding values.
In your dropdown, you will display the Display attribute of the Grades (That’s how you have All in the dropdown). In your search though, you will use the Value attribute as constraint, so that Ignore Empty Constraints will still work.
See the demo below:
Here is the details:
I simply have this option set:
The value attributes of the options are empty, 1, and 2:
And your dropdown will show this option set:
Your search constraints will be using the Value attribute:
You don’t have to if you use it other places. Just change the attribute type of the number attribute in the option set to match to the type of grade level.
If this doesn’t solve your problem, you have to show me your option set and resource data type.