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

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com'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 ...

SearchDataCenter

SearchContentManagement

Close