geopoint in distance from relation

Hi there I’m working with swift and I’m having an issue retrieving the geopoint from my table relation.

Is there a way to run a query based on location, checking the location i provide and it will check my table relation.

distance( 30.26715, -97.74306, coordinates.latitude, coordinates.longitude ) < mi(200)

That will work if I point directly to the class with the geopoint.
What I would like to know is if there is a way to check a relation.coordinates

maybe something like this

distance( 30.26715, -97.74306, address.coordinates.latitude, address.coordinates.longitude) < mi(200)

Hi Thomas,

The syntax you are inquiring about is not supported. The “coordinates” must be for a geopoint relation defined in the same table.


Thanks mark, Thats a bummer but good to know. Do you know of a way to run two different queries having the first one check the table with the coordinates in range and getting an object and seeing if that object is in another table?

Edited to make more sense

So the first query would get an object from table A. and now you want to check if an object from table A is also present in table B? (that’s how I understood your question).

Yeah, Thats is what I would like to do, But in table B i will be checking it to a relation.

I think I have figured out a different approach, I basically have
inactive class of items with a relation to an address class. A user then can make that inactive class now active (i just added as a child of active class). Thats why i was trying to do a two step retrieval for the address. But Now I have it set up to not only copy the inactive to active but also copying the geopoint from address class to the active class. IF that makes sense.

Would you happen to know of a better way of doing this?

Hi Thomas,

Could you provide your classes assosiated with ‘table A’ and ‘table B’ here or to