>>>>*-- MYSEEK >>>>LPARAMETERS tcValue, tcAlias, tcTag, tcReturnField >>>> >>>>IF SEEK( tcValue, tcAlias, tcTag ) >>>> RETURN EVALUATE(tcReturnField) >>>>ELSE >>>> pcFieldType = TYPE(tcReturnField) >>>> RETURN ICASE( pcFieldType = "L", .F. ; >>>> , pcFieldType = "T", {//::} ; >>>> , pcFieldType = "D", {} ; >>>> , pcFieldType $ "NIFB", 0 ; >>>> , pcFieldType = "Y", CAST(0, Currency) ; >>>> , "" ) >>>>ENDIF >>>> return eval ( iif (SEEK( tcValue, tcAlias, tcTag ) ; , tcReturnField; , "CAST(' ' as " + vartype(tcReturnField) +")" ; )will give you at least constant running time ;-))