Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

Previous Next
Subject: @DBLookup problem
Feedback Type: Problem
Product Area: Domino Designer on Eclipse (DDE)
Technical Area: Error Message
Platform: Windows
Release: 8.5.1
Reproducible: Always

Hello,

I am having a great deal of difficulty getting an @DBLookup formula to work in an Input form in a database which I will refer to here as the source database.. The formula is:

@DbLookup ("" : "NoCache" ; "" : Mammals_SR_Courses.nsf; "PetInfo" ; DBCPetsList; 2; "")

Petinfo is a two-column view in a different database, which I refer to as the target database. The two columns and associated data are:

Pets Petfood

Birds Seeds

Cats Tuna

Dogs Kibble

Fish Flakes

The source database has a shared field called DBCPetsList. This shared field is an editable dialog list field. It uses @DBColumn to call the PetInfo View in the target database and allow the user to select one of the pets in the Pets column. This is working fine, and the user can select one of the pets in the generated list. The @DBColumn Choices formula used in DBCPetsLIst is:

@DbColumn("":"";"":"Mammals_SR_Courses.nsf";"PetInfo";1)

Also in the source database is a shared field called DBLPetfood. DBLPetfood contains the @DBLookup formula shown above:

@DbLookup ("" : "NoCache" ; "" : Mammals_SR_Courses.nsf; "PetInfo" ; DBCPetsList; 2; "").

I have placed the @DBLookup formula in the Input Validation object of the shared field. I read that I was supposed to do that in the Domino help pages. Then, when I press F9 to refresh the page, I want to see an entry from the Petfood shared field from the target database. In other words, if the user selects "Birds" from the DBCPetsList field, pressing F9 should make "Seeds" appear in the DBLPetfood field. Instead, I get the following message: "Incorrect datatype for database function".

I have tried all kinds of troubleshooting methods to figure out what is going on, but I have had no luck. I made sure that all fields are text fields, all are editable, all are non-multi value. I've tried using both column number and field name in the formula, and nothing different happens.

I found a way to test my code and make sure the data is right. I created a button that has the following formula:

@Prompt([Ok]; "Lookup key";
@If(@IsError(DBCPetsList); "ERROR: " + @Text(DBCPetsList);
@IsText(DBCPetsList); "\"" + @Implode(DBCPetsList; "\": \"") + "\"";
@Implode(@Text(DBCPetsList); ", ")
)
);
result := @DbLookup ("" : "NoCache" ; "" : Marquesas_SR_Courses.nsf; "PetInfo" ; DBCPetsList; 2; "");

If I choose "Birds" in DBCPetsList, this test button returns "Birds." So I think that means it's working okay.

I learned that I can paste my code in a text field and press Shift F9. When I paste in my @DBLookup formula, I get this: ERROR: A view of that name cannot be found in the specified database

I've verified that I have the right View Name: PetInfo. The other field in the source database has no trouble accessing the view. I thought maybe I had the wrong column #, but that is not the case, and as I wrote earlier, it does not work using field name, either. I'm out of troubleshooting ideas. I would be really grateful if someone would look at my problem and offer some solutions. Thanks!


Feedback number WEBB8YZS74 created by ~Jennifer Ophipivitchakol on 10/12/2012

Status: Open
Comments:

@DBLookup problem (~Jennifer Ophip... 12.Oct.12)
. . You've missed out your quotes on th... (~Judy Ektumizen... 15.Oct.12)
. . . . Still having an issue with @DBLooku... (~Jennifer Ophip... 15.Oct.12)
. . . . . . Do not put the code in the input va... (~John Elluly 15.Oct.12)
. . . . . . . . @DBLookup (~Jennifer Ophip... 15.Oct.12)
. . . . . . . . . . RTM 8-) (~Judy Ektumizen... 16.Oct.12)
. . . . . . . . . . . . RTM :-) (~Jennifer Ophip... 16.Oct.12)




Printer-friendly

Search this forum

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS