How to filter RG by a related Thing's field

Dear All,

I’m not quite understanding how to do this (using Advanced Filtering…?).

Use case: Real Estate

Wanting to show a repeating group of Properties where it’s related Listing has a field of value ‘Available’.

Thx.

Hi there, @martin10… do you mean something like this?

If so, you would add the :filtered operator to the end of the repeating group’s data source. Then, when adding a constraint to the filter, scroll to the bottom of the dropdown and select Advanced. At that point, you can build the expression for the filter constraint, and how you will build it depends on your setup, of course. In my example, there is a status field on the Listing data type, and that field links to an option set that defines the listing statuses.

Oh, and I’m guessing you know advanced filters are applied on the client (browser) side, so they can be a bit slow. In my example, the search (which has no constraints on it) will return all of the properties in the database to the browser and then do the filtering there. Anyway, just something to keep in mind if performance becomes an issue.

Hope this helps.

Best…
Mike

Thank you Mike. Ah, ‘This Property’ is what I missed, I was doing another ‘Do a search for’ in that bit.

I actually ended up creating a Custom State containing the list of Listings that were ‘Available’ and then just adding that State’s list’s Properties to my data source.

In retrospect that might actually be more performant? How else can one do the search for related items - but on the server?

If you save the property on the listing, you could do a search for listings with a constraint where the property equals a certain property and a constraint where the listing is available.

Ah but this is for a conditional data source where the main RG is type Property. I think I have it though, so thanks. Main point being, how to use Advanced Filtering on This Property.

1 Like

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