The Quickest Way How To Use @Dbcolumn And @Dblookup
document related to the selected key. For example, all information related to
the employee name like address, phone, fax, etc. Solution is usually formula
uses @DbColumn and @DbLookup. The quickest way how to use them is create view
only with two columns. There are employee name (key) in the first column (this
column must be sorted) and list of all related information in the second
column. Then formula selecting and filling information into the field can be
like this :
REM "Create list of keys";
tmpList := @DbColumn("":"";"":"";"ViewForSelection";1);
REM "Select one key from the list";
tmpKey := @Prompt([OKCANCELLIST];"Keys";"Select appropriate key : "; "";
tmpList);
REM "Read the list of information related to the key";
tmpRelatedInfo := @DbLookup("":"";"":""; "ViewForSelection"; tmpKey; 2);
REM "Split information into the fields";
FIELD FirstField := @Subset(tmpRelatedInfo;1);
FIELD NextField := @Subset(@Subset(tmpRelatedInfo;PositionInList);-1);
....
FIELD LastField := @Subset(tmpRelatedInfo;-1);
@All