Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

dblookup

Posted on 2004-10-07
9
Medium Priority
?
464 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 500 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

916 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