Editing location docs programmatically

Here’s an interesting question (I think)…

Does anyone know a method for determing the current location document and getting a handle on it?

Script or formula - I’m agnostic :slight_smile:

I know how to get all of them and step through them individually, but is there any way telling which is the current one?

Stephen Lister

Subject: A more elegant way …

The current location document is available via it’s NoteID (2nd param) in your notes.ini via “Location=”.(Copied from a Thomas Gumz’ answer.)

This way, you can use “Set notesDocument = notesDatabase.GetDocumentByID(noteID$)”.

Subject: RE: A more elegant way …

Ohhh - very nice :slight_smile: Thank you for that!

Stephen Lister

Subject: Editing location docs programmatically

The current location is written to the Notes.ini. You can get this through environment variable (using NotesSession) then lookup the matching location documents in the locations view of the local address book (as specified in the names= line of the Notes.ini).

Subject: RE: Editing location docs programmatically

Thanks for that - I suspected that might be the answer, but was hoping that there might be a more elegant way of doing it.

Stephen Lister