lotus-noteslotus-dominolotus-formulalotus-designer

how to write a code to open a database view using @dblookup from lotus replica server


i am using two lotus domino servers(main server and lotus replica server), my all mail databases and workflow database are store in two servers.

Main sever name = "sanvar"

Replica Server Name = "varsan"

Mail and workflow database are replicating and working fine but workflow forms not working when my Main server down state.

ex: i am getting employees name from empentry database and it's code like

@DbLookup( "" : "NoCache" ; "sanvar": "empentry" ; "master" ; @Name([CN];@UserName) ; 2); but my main server down condition i am accessing a form through replica server it showing :

"SERVER ERROR".

pls suggest me how to get user name from replica server.

thank you.


Solution

  • Replace "sanvar": "empentry" in your argument list with @DbName, like this:

    @DbLookup( "" : "NoCache" ; @DbName ; "master" ; @Name([CN];@UserName) ; 2);
    

    This will return the name of the current server and database in a list. It is a very useful function, and can be combined with @Subset to just get the server name in cases where that's all you need. Please see the doc for @DbName here.