I would like to add search constraints on a thing based on a custom state. I would like to add this as an addition to existing constraints and not have to build a new search. The search forms the basis of a repeating group.
Type = Perm
Age > 20
Now, if the Hair Color state = 1 I would like to add the constraint:
Hair Color = Red
Other thought, can you search based on a custom state?
Any Field =
This needs to be optional, which would work if the field was blank. So, it could work on a filter as well, but only if a checkbox was enabled to take it into consideration. Clear as mud?
One solution. Set a workflow so that anytime Hair Color State = 1, then make a custom state called, say, Hair_Color = “Red”. And, add a workflow or logic to remove “Red” as the value when the color isn’t equal to 1. (Note, you could also just store the color as the word and skip the number itself to minimize complexity of using it as a search filter)
Then, in your search, add a filter / condition:
Hair Color is Current Page’s Hair_Color
Thanks for the suggestion. Your idea gave me my solution. While probably not quite how I asked the question my end result is the same, I created a RG with a list of search terms I want with a toggle switch next to them. Each on toggle adds them to a list in a custom state. I then use this list against what to search upon. In my case it is any field. thanks to @romanmg for her YouTube video adding users to lists. While neither were quite what I was looking for 1 + 1 = 2.
Thanks for your seed of an idea. Using the RG I can add as many search terms as I want with a single state and workflow.