Lookups in LotusScript

I am just drawing a blank today. So I figured I would ask. I want to take the following and do the same thing in lotusscript so the when someone mailed a doc in the db it would gather all the names in a view and update another doc with those names. Any direction would be helpful. thx

DocNum:=“3EECE0B165156240852575A20050EFA3”;

ListName=“Americas Cluster KM Community”;

NewMembers:=@DbColumn( “” : “No Cache” ; “” : “” ;“Subscribers” ; 1 );

SetNames:=@Trim(@Unique(@Name([Abbreviate];NewMembers)));

@SetDocField(DocNum;“Members”; SetNames);

SELECT @All

Subject: Lookups in LotusScript

@DbColumn is one of those instances where the best way to do the job is usually to use Evaluate and just run the formula, so:

Dim nameArray As Variant

nameArray = Evaluate({@Trim(@Unique(@Name([Abbreviate];@DbColumn(“” : “No Cache” ; “” : “” ;“Subscribers” ; 1))))})

Subject: RE: Lookups in LotusScript

Except you will probably want to pass in a NotesDocument object as the second argument to Evaluate to provide the context by which the “current database” can be determined.