@DBLookup to local view, Cannot get it to work

I’m very new to Lotus development and am having great difficulty getting any response from a @DBLookup from one view to another on the same local database.

I have two views, each based on a different form and each selects documents based on their respective form. All fields are defined as Text to keep things simple for now

The first view (mykeyview1) has fields/columns key1,data1 and data2. The key1 column is sorted ascending (not categorised) with Case and Accent sensitive sorting ticked.

The second view (mydataview1) has a few columns one of which is called field4. On a further column called “lookup”, I have put in the formula to perform a lookup on mykeyview1 based on the value in field4

v := @DbLookup(“Notes” : “” ; “” : “” ; “mykeyview1” ; field4 ; data2);

@If(@IsError(v); “DBLookupError”; v);

I always get a blank/null value in the “lookup” column, ( not even “DBLookupError” )

I have tried all sorts of permutations with using the column name. underlying field name programmatic field name.

Apart from identfying any silly istake that I am making, is there any way to get some form of debugging/tracing for formula code or even the error text which many other posts say they get when something goes wrong, though have not been able to see (how do I view the error text?)

Any help greatly appreciated in getting this to work

Subject: @DBLookup to local view, Cannot get it to work

Copied straight from the help for @dblookup:

Usage

This function does not work in column or selection formulas, or in mail agents.

A quick read of the manual or a search of this forum would have told you you can’t use dblookups in a view. A view row can only display the data in that document.

One way round it is to create a computed field on the document with that formula and display that field value in the view