Solved

dblookup

Posted on 2004-10-07
9
457 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
Technology Partners: 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

Technology Partners: 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

I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
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.
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

617 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