Need Advise for Map markers

70 views
Skip to first unread message

Gencin Biri

unread,
Mar 28, 2025, 8:26:33 PM3/28/25
to mementodatabase
I have a library with contacts, which contains adress, and location ( marker )
We also have a to do list library, When i create a task here, im linking it to the contact for who the task has to be done.
However i have to fill in location each time, in order to get this location displayed on the map
is it possible to get the location marker from contacts database? otherways i have to put in location each time we create a task. 




Er Mo

unread,
Mar 29, 2025, 3:01:39 AM3/29/25
to mementodatabase
Hallo
Du brauchst ein wenig Skript um das zu machen . Das Skript kommt in einen Trigger --> Beim erstellen eines Eintrags --> Vor den Speichern .Im Skript musst du 3 Feldnamen anpassen .
A = Feldnamen von wo aus Verlinkt wird
B = Feldname wo die GPS Daten Geschriben werden
C = Feldnamen von Wo die GPS Daten geholt werden in der Verlinkten Bibliothek

Hello
You need a little script to do this. The script goes into a trigger --> When creating an entry --> Before saving. In the script, you need to adjust three field names.
A = Field name from which the link is made
B = Field name where the GPS data is written
C = Field name from where the GPS data is retrieved in the linked library

Skript:

var e=entry()
var link = e.field("A")
var lort = link[0].field("C")
var lat = lort.lat
var lon = lort.lng
e.set("B",lat+","+lon)


Ernst

Brandon M.

unread,
Mar 31, 2025, 10:29:27 AM3/31/25
to mementodatabase
Hello,

Have you tried using a Lookup field? That is what I use to pull location data from my top level Customer Database directly into the linked Work Order Database. The Lookup field should contain all libaries your task entry has linked, and you will be able to pull from there. No Javascript required.

I recommend Ernst's method of using a trigger script if you need the tasks to be pinned to a location, even if the top level customer changes. ie Customer A sells house and Customer B buys it. So you adjust Customer A's location field in the top level database. This will change all the location information in every linked task. So say you're trying to keep a history of the tasks done at a particular location regardless of owner, think appliance repair like HVAC or Plumbing, you would want to set the location field as a copy of the current field instead of using the Lookup field.

Best Regards,
Brandon Martel
Reply all
Reply to author
Forward
0 new messages