Manage Learn to apply best practices and optimize your operations.

Get current location doc with LotusScript

Get the current location doc with LotusScript.

Believe it or not, there is no LotusScript method or property to get the current Notes client Location document.

Code below gets a handle to it by poking the Notes.ini "Location" variable's second comma delimited value (the Note ID) and then using it in the GetDocumentbyID database method.

Dim session as New NotesSession
Dim pnab as New NotesDatabase("", "names.nsf")

' Pick out the second argument in Location INI variable (i.e. the Note ID
of current location)
' Following string extraction cannot be done with R5 StrLeft() StrRight()
fcns b/c it won't work in R4 client, hence good old @formula Evaluate() to
the rescue...

CurrLocation$=session.GetEnvironmentString("Location", True)
CurrLocationNoteID=Evaluate( { @Left(@Right("} & CurrLocation$ & {"; ",");
",") } )

Set currlocdoc=pnab.GetDocumentbyID( CurrLocationNoteID(0) )

Dig Deeper on Domino Resources - Part 7



  • iSeries tutorials's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...