@dblookup

Hi

I have a problem with @dBLookup

I am trying to retrieve information from a view and populate it onto a form when the user creates a new document

My code is below:

value:=@DbLookup (“” : “NoCache”; “” ; “SectionType”; Sect; 1);

@If(@IsError(value);“”;value)

SectionType being the view Name

Sect being the field on the form

1 being the column from the view

The view is in ascending order

does anyone know what i am doing wrong

I am calling it in InputTranslation and have tried DefualtTranslation

Subject: @dblookup

For an editable field, if you want the value displayed as soon as the document opens, you need to put it in the Default Value property of the field. However, this field must appear on the form AFTER the Sect field, otherwise it won’t find a value for Sect.

If you want this to refresh when the user changes the value of the Sect field, then it should probably be a computed field, with the formula in the Value property.

However, as you have written the formula, all it will return is the value of Sect - you are returning column 1, which must contain the lookup value (Sect), so you probably need a different column.

Note also that the first column in the view needs to be sorted.

Subject: @dblookup

There is a problem in your syntax.Your syntax is

value:=@DbLookup (“” : “NoCache”; “” ; “SectionType”; Sect; 1);

@If(@IsError(value);“”;value)

The syntax should be like that

value:=@DbLookup (“” : “NoCache”; “server name” :“databasename”; “SectionType”; Sect; 1);

@If(@IsError(value);“”;value)

There should be colon between server name and database name.

May be this could be the problem.

Subject: RE: @dblookup

Actually the empty string is acceptible for the servername:database parameter. From the Designer Help:

  • To perform the lookup on the current database (the same database in which the formula is being evaluated), specify “” as the entire argument to the function. “” means the local Domino directory where you are executing.