Morning all,
I'm rewriting a screen and the browse in it is based on data pulled from several tables. The way I've got it now, the user selects data from a few selection boxes (multi-selection available) and based on the data selected the query is ran:
Is there a quicker alternative to using the LOOKUP function for this? Maybe I should be loading the selected data differently?
I'm rewriting a screen and the browse in it is based on data pulled from several tables. The way I've got it now, the user selects data from a few selection boxes (multi-selection available) and based on the data selected the query is ran:
Code:
/* The variables contain the selected data from selection boxes
Example:
var1 = "test,data,for,looking,up".
var2 = "more,test,info,for,seeking". */
FOR EACH tbl1 NO-LOCK WHERE
LOOKUP(tbl1.fld1,var1) > 0,
EACH tbl2 NO-LOCK WHERE
LOOKUP(tbl2,fld1,var2) > 0 AND
tbl2.fld2 = tbl1.fld2:
/* ... code here ... */
Is there a quicker alternative to using the LOOKUP function for this? Maybe I should be loading the selected data differently?