Lotus Notes FAQ Visit Our Sponsor!

How do you write DbLookups so they work on a local database and on the server?

Use @Dbname to test for the location using these formulas::

DBName := @Text(@DbName);
Server := @Subset(DBName; 1);
Database := "KeywordLookup";
ClassCache := "Notes" : "NoCache";
View := "LookupKW";
Key := "Key Name";
@DbLookup(ClassCache; Server : Database; View; Key; "Ret_Value")

Now you can substitute the Server and Database variables everywhere in the Notes application. DbLookups or @Commands will automatically run local when the user is local and run on the server when the user is on the server.


Applies to Notes Versions: 3, 4, 4.5, 4.6, 5
Last Modified: January 6, 1998