Home to get an field from the 'current' location document?

You no you can press ‘Edit Current’ location? How to access and return a value from the users ‘Current’ location document?

Preferably I would use a “supported” method. The only way I can see to do this is using the undocumented method @LocationGetInfo:

val2:=@DbLookup(“Notes” : “NoCache”; “” : “Names.nsf”; “Locations”; @LocationGetInfo([FullName]); “LocationType”);

Subject: you’d need to use LotusScript

Sub Click(Source As Button)

Dim ns As New NotesSession

locinfo$ = ns.GetEnvironmentString("Location", True)

parseloc = Split(locinfo$, ",")

curloc$ = parseloc(0)

Dim db As NotesDatabase

Set db = ns.GetDatabase("", "names.nsf")

Dim vw As NotesView

Set vw = db.GetView("Locations")

Dim doc As NotesDocument

Set doc = vw.GetDocumentByKey(curloc$, True)

loctype$ = doc.LocationType(0)

Print loctype$

End Sub