Priya
Priya

Reputation: 95

form not picking up data from another database

I have a form. When I open the form the two fields called office and group should be picked up from another database named something like staff.nsf. The data is picked up based on the applicant name as key. I have included my name in staff database. But the form is not picking up the two fields from the staff database.

The field formula goes like this,

server := @Name([CN]; @Subset(@DbName; 1));
temp:= @If(Applicant != ""; @DbLookup( "" : "NoCache"; server:"Mast\\Staff.nsf";
"ByApplicant";Applicant; 2); "");
@If(@IsError(temp);"";temp) 

Is it a system bug? Can anybody help please.

Regards, Priya

Upvotes: 0

Views: 362

Answers (2)

Richard Schwartz
Richard Schwartz

Reputation: 14628

Lotus Notes is more than 20 years old, and extremely well-tested. It is very unlikely that you have found a "system bug". There are any number of possible problems here, and you need to carefully rule them out until you find the actual problem.

The first thing you should do is take the @IsError out of the formula (temporarily). By having it there, you are suppressing a potentially useful error message. Ok... admittedly the error messages are usually not that helpful, but sometimes they are. If you don't want to take it out of your formula, just add another computed-for-display field with just the @DbLoookup -- and follow Ken's advice about hard-coding everything.

Then review all of the following:

  • Is "mast\staff.nsf" the correct path for the database?

  • Do you have access to the database?

  • Is "ByApplicant" the correct name for the view? (Spelling errors happen!)

  • Do you have access to the view?

  • Do you have access to the documents in the view?

  • As Ken mentioned, is the first column in the ByApplicant view sorted?

  • Is the name value you are passing for Applicant in the exact same format that appears in the view column? (I.e, if it appears in abbreviated form in the view column, make sure that you are passing it to @DbLookup in abbreviated format.)

  • Does the second column of the view contain the value that you are trying to read? (Check out the rules for counting columns in the documentation for @DbLookup.)

Upvotes: 1

Ken Pespisa
Ken Pespisa

Reputation: 22284

A few thoughts:

The ByApplicant view needs to have its first column sorted alphabetically and that column should be the list of applicant names you are matching on

Try hard coding the value for applicant in the @DBLookup to see if it works, and to rule it out as the problem.

This does not work on the web, only on the client (I believe)

Upvotes: 0

Related Questions