Constraint or filter RG based on other datatype

So, i’m trying to wrap my head around how to filter a RG based on a relationship with an another datatype.

I came upon this: Filter a repeating group by a field that does not belong to the repeating group's type - however, I can for the life of me not wrap my head around the solution or if it’s applicable to me. Many a tries has not yields a functioning filter.

I have two datatypes:

Location and Offer

Locations can have multiple offers. Each offer has a type, “OfferType” from an Options set.

I have a RG that lists all locations. “Search for Locations”

I have crated a dropdown that fetches the Type from the Options Set. “All OfferTypes”.

What I want to is to be able to filter based on all locations that has an offer that matches the selected type from the dropdown.

I have tried “Do a search for locations:filtered” with various variations using “Advanced”, but I cant seem to get it right. AFAIK :filtered is the way to go since I cant just create a constraint on the Locations search as that is only the available fields for that datatype and the OfferType is on the Offer set.

How should I add this filter to be able to combine with other filers (regular constraints based on fields from “Locations”.

Thank you,

Hi there, @mikael.uu… if I understand your post correctly, I believe you have to come at it from a different angle, with that angle being a search for offers that looks like this.

So, give that a shot and see if it produces the desired result.



You are 100% correct, IDK why I did not think about that. Works as intended, for sure. Thank you.

Some basic SQL classes in Uni need some serious refreshing. :stuck_out_tongue:

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.