Is there a way to search a list based on items in a sublist?
For example: suppose we have a thing type “County” with a field Cities that’s a list of “City” things; and each City thing might have a “Name” (text).
In this scenario, how would you search for all County things whose Cities includes a City entry with Name=“Springfield”?
The best I’ve been able to come up with is to start with a list of all Countys, then use a filter to evaluate the Cities sublist of each:
Search for County [no constraints]: filtered by -> Advanced: This County’s Cities: filtered by -> Name=“Springfield” : count>0
Is this the right approach?
The alternative is for each sublist to link back to its parent… in other words, each City thing includes a field “ParentCounty,” of type County. Then you could do,
Search for City [constraint:Name = Springfield]'s ParentCounty
Both of these routes seem unnecessarily complicated for this task. Am I missing something?