Places and distances
Coming soon: how far a customer is, which technician or warehouse is closest, whether an address is inside your area: distances between Location columns, written into real columns.
Coming soon: with the next version of General Caster. This page shows how it will work.
monday shows Location columns on a map, but can’t tell how far two places are. General Caster calculates it and writes it into a real column, so automations, filters and dashboards can use it: the distance to the customer, the closest technician, whether a delivery is inside your area. coming soon
Places
A place is a Location column. In a formula it reads as latitude, longitude and address (45.4064:11.8768:Padova PD, Italia); you can also write the two coordinates yourself: "45.4064, 11.8768".
An address in a Text column is not a place yet: the Text to Location block turns it into a position in a Location column, then the formulas below use that column. Inside a formula, GEO.LOCATION({Address}) does the same, e.g. GEO.DISTANCE(GEO.LOCATION({Address}), {Office}); it costs 2 credits per address (see Addresses into a Location column). A formula that gets an address alone gives a Wrong value error.
How far
GEO.DISTANCE(from, to) gives the straight-line distance in km. Add "mi" for miles or "m" for metres:
| Formula | Result |
|---|---|
GEO.DISTANCE({Customer}, {Warehouse}) |
209.732 |
ROUND(GEO.DISTANCE({Customer}, {Warehouse}, "mi"), 0) |
130 |
IF(GEO.DISTANCE({Customer}, {Office}) > 100, "Overnight", "Day trip") |
Overnight |
The distance by road is longer, often by 20–40%: use the straight line for zones, comparisons and rough estimates. Given a list of places (for example the Base of the technicians connected to the item), it gives one distance for each.
The closest one
GEO.NEAREST(place, places, [give]) finds the closest of a list of places. Without give it gives the address; with give, the item in the same position of another list:
GEO.NEAREST({Customer}, MONDAY.ITEM.COLUMN({Technicians}, "Base"), MONDAY.ITEM.NAME({Technicians}))
Written into a Text column, this gives the name of the closest technician among the ones connected to the item.
Inside an area
GEO.WITHIN(place, center, km) gives TRUE when the place is within that many km of the center:
IF(GEO.WITHIN({Delivery address}, {Warehouse}, 50), "Local", "Courier")
Written into a Status column, it starts monday’s own automations: notify the right team, move the item to a group.
Credits
These functions are calculated by General Caster, without external services: they are included in the run’s credit. Reading connected items (MONDAY.ITEM.COLUMN) costs as usual, 1 extra credit per 25 items read.