Solved

dblookup

Posted on 2004-10-07
9
442 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
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
 
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
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…
Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

705 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now