# Within an area (of a map) how to have several points assigned to that place

(Lavanderias El Sol) #1

Hello friends…
when users sign up with their account, I use this function HERE () to know where they are, (user settings) the idea is to assign them automatically a store, but even if the phone does not move from the table, it always gives me numbers different 20.69NNNN-103.33NNNN, where the N can be any number. Now the reality is that the warehouse is a whole block, so it would be convenient to assign an area of 200 meters. As I can do so that within an area of 200 meters you can assign the warehouse … there are several warehouses all separated.

that is to say that within the red circle any blue dot is assigned to a store …

I would appreciate your help …

(Reza Raoofi) #2

I think you should be able to use DISTANCE(…) function, and for example if the distance between HERE() and a particular location that you could consider as official address of that block is less than 0.2 (distance returns km), then replace the entered number with that official address.

(Lavanderias El Sol) #3

Hello Reza …

Your idea is very good, I wanted to put it into practice but I find this problem …

DISTANCE (LATLONG (20.700896, -103.364275) - HERE ()) <.2

the “EXPRESSION ASSISTANT” says that the parameters are invalid!
I have tried with quotation marks, or

DISTANCE (HERE () - HERE ()) and gives the same error!

What should the format of the parameters be so that I can do the distance evaluation ??

(Lavanderias El Sol) #4

other examle, invalid input types…

(Reza Raoofi) #5

Did you have a chance to read the document from the link I sent you? Here is the paragraph about DISTANCE() function:

• DISTANCE( location , location ) returns the approximate distance in kilometers between two locations expressed as LatLong values. DISTANCE() does not work with Address values.

There has to be comma instead of “-”.

(Reza Raoofi) #6

Have you tried just this expression and see the test results in expression builder?
DISTANCE (LATLONG (20.700896, -103.364275) , HERE ()) <.2

(Lavanderias El Sol) #7

Reza…
You are very right, I will be more careful with syntax.

I’ve already worked on the Distance () formula, but I find that in some cell phones and laptops, HERE () does not get a fast value and when it calculates distance it gives me a huge amount “11405.8631957932” …

Would it help me to get some unique value of the mobile / tablet / pc that is being used at that moment, as the name of apparatus ! or something that distinguishes them, any ideas?
thx…
Captura%20de%20pantalla%20(62)|690x387