Get data from a view in a form

Hi,My question is about getting data from views.

I try to get data in a textfield but whatever I try, I get an error message that something is wrong.

I already tried something with @dblookup like:

@DbLookup(“”; “”; “Table”; Column4; 3);

But then I get the error message: “Field: ‘txtField1’: Entry not found in index or view’s index not build”

@DbColumn works, but that adds a whole column and that’s not what I want. I want to query a value from a view using a field value.

So for example:

I have a Table A and a Table B

Table A has data for user incidents

Table B has data for Users like username, email, phone number

In a form I want to get the data from Table B using a query on username, in sql it would be: SELECT phonenumber FROM TableB where username = name

How can I do something like that in Lotus Designer?

Subject: RE: Get data from a view in a form

The error message is explained here.

Subject: Get data from a view in a form

follow the dbcoluman and dblookup parameters and must sort and categories that view .

Subject: RE: Get data from a view in a form

About a week ago I got it finally working with help from someone.

Created a computed text field (for the new value from the view) with following formula:

@If(@IsError(@DbLookup(“”:“NoCache”; “”:“”; “Gebruikers”; cmbKlant; 3));

 "";

@DbLookup("":"NoCache"; "":""; "Gebruikers"; cmbKlant; 3)

)

and a editable names field with Control Choices:

Choices: Database → current database

Choices: View → Gebruikers → Column 1

and a check before “Look up addresses on document refresh” for field cmbKlant.

So now when cmbKlant changes the database will do a lookup and place the value in the computed text field.

This worked. So I hope I can help someone else in the furture by placing this information here.

Thanks for the help!