lets say my type is workers and one field is hair color.
Now I have many workers with identical hair colors.
My problem is that I want to use a repeating group to create a navigation.
(Like “brown hair | blonde hair | red hair”)
If I search for the field hair color then my repeating group shows the color “brown” multiple times instead of just once.
I am a bit confused and frustrated by this. Has anybody an easy solution?
Hi there, @florian.barthel94… the problem is you are searching for workers, so each item is a unique worker regardless of their hair color.
If you are trying to create a hair color repeating group for navigation purposes, the data source of the repeating group should be whatever it is you are using to define the hair colors (note that it can be done with a search for workers and unique items, but I’m not sure why you would go that route). Are you using an option set (which is likely how I would do it) or is it a custom data type? Whatever it is, if you set it to be the source of the repeating group, you can get a list of all of the different hair colors.
The above being said, I would probably go a different route if you are simply trying to filter a repeating group of workers based on things like hair color. You could have a repeating group like the one you described (i.e., a search for workers), and you could have a dropdown above it that lists the different hair colors. When you select a hair color from the dropdown, the repeating group could filter down to only those workers with that hair color. If you want to go this route, you would simply add a constraint to the repeating group’s search where hair color = hair color dropdown's value, and you would select the Ignore empty constraints checkbox to make sure all workers are shown when no hair color is selected in the dropdown.
Anyway, I hope what I have written makes sense, and I hope it helps.
I just tried your recommendation and watched a tutorial on option sets. I think that is the best solution for my question even though I was eager to create it somehow with types.
Thank you for your help!