To make a @DbLookup to another database, you need to know the servername & filepath (or replicaid) of the lookup database .
You can use profile documents - but these are hard to maintain if you have many databases, and not very fleksible.
The best way is to use the dbConfig.nsf database. In this database to registre all your lookup databases with an alias and the database location (server+filepath). Notice that you can have multiple server names and use relative filepaths, thus giving great flexiblility. You also have the opportunity to create exeptions, if the database (for some reason) is located in a different folder on one server.
More info in the Developer Tools pdf file and in the blog entry
With the dbConfig database it is simple to get a reference to another database. In Lotus Script you will write:
use "cls.fw"
dim config as new DbConfig
set db = config.getDatabase( "MEDIA" ) 'to find the database with the alias=MEDIA
From formula, you must include a shared field. Make a copy of the sample field, name it 'dbMedia', change the alias in line 3; alias ="MEDIA" and you are ready to go:
@dbLookup( ""; dbMedia; ..... )
Sample code can be found in the 'Developer sample' form in the database.
Download