Solved

dblookup

Posted on 2004-10-07
9
450 Views
Last Modified: 2013-12-18
Hi experts,
I have a Notes view which has 2 column: FirstName and LastName.
FirstName     LastName
AAA             A1A1A1
BBB              B1B1B1
CCC             C1C1C1

In another form, I have a field named LN (computed) and the value for this field is:
FIELD LN:= @DbLookup("": "NoCache"; "":"";"ViewName";"AAA";2);

In fact it will return A1A1A1 but it does not. Error msg is "ERROR: Server error. Entry not found in index". I have tried: with some views it run OK, with others it returns this error. I have check but cannot find out the reason.
Please help. Thanks, Na.


0
Comment
Question by:khanhna
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 15

Accepted Solution

by:
Bozzie4 earned 125 total points
ID: 12247531
Your first column (firstname) has to be sorted (ascending or descending, doesn't matter)

cheers,

Tom
0
 
LVL 15

Expert Comment

by:Bozzie4
ID: 12247546
And you need to catch errors.  Rewrite the formula, put this in the formula field for the computed field:

res:=@DbLookup("": "NoCache"; @dbname;"ViewName";"AAA";2);
@if(@iserror(res);"Error";res)
0
 
LVL 19

Expert Comment

by:madheeswar
ID: 12247559
for the field LN, place below formula:
res:=@DbLookup("": "NoCache"; "Servername":"dbname.nsf";"ViewName";"AAA";2);
@If(@Iserror(res);"";res)

view first column should be sorted and should be a string.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 19

Expert Comment

by:madheeswar
ID: 12247577
Tom,
I am seeing similar variable( res) is used so many times between us. Coincidence.
I did not saw your answer. Else I wouldn't posted.
0
 
LVL 15

Expert Comment

by:Bozzie4
ID: 12247699
I don't know where I got this "res" from, but I've been using it for many years now.  I think it's used in the Help, or maybe in a Lotus Course or something ?
But if you want to claim "res" as your own, I'll use something else from now on :-)

cheers,

Tom
0
 
LVL 14

Expert Comment

by:p_partha
ID: 12247850
even i use res , must be from help :)

Partha
0
 
LVL 19

Expert Comment

by:madheeswar
ID: 12247928
yeah. May be.
No need to shift to another variable TOm. Let us use the same.
0
 
LVL 3

Expert Comment

by:Andrea Ercolino
ID: 12252396
Maybe the error here is simpler than not catching the @DbLookup error, which sould be catched always.

If the ViewName expression in the formula is the name of a variable or a field, the formula should read:
  FIELD LN:= @DbLookup( "":"NoCache"; ""; ViewName; "AAA"; 2 );


PS: "res" clearly stands for "result", but it also means "(a) thing" in latin... :-) like "res publica", which means "the state"

0
 
LVL 19

Expert Comment

by:RanjeetRain
ID: 12252896
Are you sure that the column does contain "AAA". Isn't it possible that it contains spaces? A better idea will be to modify the column formula to trim(firstname) and discard/rebuild the index prior to testing it.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Lotus Notes - Broken Links report 5 223
Domino Server 2 84
attaching a file lotus notes 4 116
Lotus Notes transfer mail box problem 6 109
IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question