Carrot reference
Functions
nearestOffice()
returns the nearest geographic location, including only office locations (no remote locations), to a particular person, group, or address syntax nearestoffice(entity\[, list]) parameters parameter type description entity person docid\ bzrx1mtdjk8cgkaw7ujqj , group docid 7kum4sl wt2y ldfmo6qb , or address docid\ khi0d64z7evk0dsm gjwf the starting point to measure distance from list list docid\ xwh cukhj9waqaefb7h71 < group docid 7kum4sl wt2y ldfmo6qb > (optional) a list of groups to compare against the one that is the nearest geographically, and is also an office, will be returned if this parameter is not provided, all locations that are offices will be compared return type person docid\ bzrx1mtdjk8cgkaw7ujqj , group docid 7kum4sl wt2y ldfmo6qb , or address docid\ khi0d64z7evk0dsm gjwf whichever entity provided in the list , or whichever group docid 7kum4sl wt2y ldfmo6qb location is closest geographically, will be returned examples nearestoffice(person) returns the nearest location, that is an office, to the person nearestlocation(person, db group find{type\ location and name\ atlanta,boston,orlando}) returns which of the office locations matching "atlanta", "boston" or "orlando" is closest to the current person