@picklist

tmpCust:=@PickList( [Custom] ; @DbName ; “$Customer” ; “Select a Supplier” ; “Please select Supplier” ; 1 );@SetField(“O_CompanyName_1”;tmpCust);

I am using the above code to select the company Supplier from a view kown as “$Customer”.But when I do this, I can only manage to pick up one column value ie the first column.I need as well to able to pick up other column values eg the company address, contact name which are in the same view and populate certain fields in my form.

Please help me to improve my code.such that i pick the values and populate my form at one goal

P/s note that the $Customer view is in the same database.

Subject: Old tried and true method…

Add a hidden columnt to your view which contains all of the data you need to gather imploded with a seperator:

i.e. @Implode(Name : Address : Zip; “~”); ← say this hidden column is column 5

Look up to that hidden column:

tmpCust:=@PickList( [Custom] ; @DbName ; “$Customer” ; “Select a Supplier” ; “Please select Supplier” ; 5 );

And use @Word to parse through your returned value:

@SetField(“O_CompanyName_1”; @Word(tmpCust; “~”; 1));

@SetField(“O_CompanyAddress_1”; @Word(tmpCust; “~”; 2));

etc.

Subject: @picklist

Return the document key from your @picklist and make the fields where you want the other column values computed for display with @dblookups in em.

/Klaus

Subject: @picklist

Use lotusscript: PickListCollection gives you an easy way to do this.