Back in February I posted Structured DBlookup’s in Lotus Notes. Very popular. Implicit in that was that the same could be applied to DbColumn’s, but the web (and Google) is all about being explicit, so here we go :
class := "Notes";
Cache := "NoCache";
server := @Subset(@DbName; 1);
database := @Subset(@DbName; -1);
view := "In Progress";
value := @DbColumn( class : cache ; server : database ; view ; columnNumber );
The commentary in the Structured DBlookup’s in Lotus Notes post still applies.
The changes from the DBLookup are : no key and you have to read a columnNumber, not a field name.
In general : Having views just for lookups are a very very good thing. You can append columns to such a lookup view but should never insert or delete them. (you don’t know what you might break) As of R6 you can use the @Sort function to order the result without a new lookup view. I also did a @Unique to remove duplicate, which is usually a good thing to do.
value := @Unique(@trim(@DbColumn( class : cache ; server : database ; view ; columnNumber )));
since in R6.x+,Interim results in a formula can be greater than 64KB, but the end result of the formula cannot.