0
votes

I'm trying to use an @DbLookup in my XPage app to pull data from a column in another application. The application filename that I'm wanting to call is: aApplications\HCHPhoneBk.nsf but I'm not sure how the structure for the @DbLookup would go. It's located on a server called: DomApps01/Hendricks and the column I am wanting to get is the 2nd one.

This is what I have now, and it's not working.

@DbLookup("";"HRH Phone Directory":"aApplications\HCHPhoneBk.nsf";"People";
1
Chad. In JavaScript the semicolons become commas - stwissel
Woops, good catch. Thanks! - Robert

1 Answers

4
votes

The syntax for @DbLookup() is:

@DbLookup([server, path], view, key, column)

So in your case it should look something like this:

@DbLookup(["DomApps01/Hendricks", "aApplications/HCHPhoneBk.nsf"], "People", key, 2)

...where "People" is the view you want to search and key is the search value for the first column. If you just want to retrieve all the values in the second column without filtering it by the first column, use @DbColumn instead of @DbLookup; the syntax is identical, except you would omit the key parameter.

P.S. Note the use of / instead of \ in the application path. \ is an "escape character" in JavaScript, so in this syntax, / is preferred.