Question

In my current database, I am trying to open a view from another database using

Here is my database formula

CurrServer := @ServerName;
HistPath := @DbLookup("":"NoCache"; "":""; "AdminKeys"; "DatabaseReferencePMWOHist"; 2);
CurrServer + "!!" + HistPath

When I click on the link in the application, it throws this error: File 'DomTest01/HCHtest Engineering\PMWorkOrderMgmtHist.nsf' does not exist.

I am on DomTest01 server, but it needs to be looking for aApplications\PMWorkOrderMgmt.nsf instead of Engineering\PMWorkOrderMgmtHist.nsf

Where do I need to make my change?

Was it helpful?

Solution

Your @DbLookup gets the database's path from second column under key "DatabaseReferencePMWOHist" in view "AdminKeys" in your current database.

So, the only thing you have to do, is to go into view "AdminKeys", search for key "DatabaseReferencePMWOHist", open the document and change value from "Engineering\PMWorkOrderMgmtHist.nsf" to "aApplications\PMWorkOrderMgmt.nsf".

Your code should work without any changes - only a setting in a document is wrong.

OTHER TIPS

The second parameter of the @DbLookup formula tells what server and database to use. If you want to search another database on the current server you are on, use this command:

CurrServer := @ServerName;
HistPath := @DbLookup("":"NoCache"; "":"aApplications\\PMWorkOrderMgmt.nsf"; "AdminKeys"; "DatabaseReferencePMWOHist"; 2);
CurrServer + "!!" + HistPath
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top