Slightly hacky - but this should work:
Testing | Bubble Editor
You can’t really pull this off with a single search, this will require as many searches as there are unique values for maxDistance.
Depending on your database, data volume, and how frequently this function will be called, you might want to look into creating a system to contraint the search on the 0_Initialiser endpoint so that only plausible Type_Bs are queried instead of querying all the database. Something like a country/region/city constraint or similar.
1 Like