/** Retrun Type : string Argument Name as_tj[] */ long count,i string ls_filter count=upperbound(as_tj) if count<=0 then return '' //单个过滤条件 if trim(as_tj[1])<>'' and not isnull(as_tj[1]) then ls_filter=as_tj[1] //多个过滤条件 for i=2 to count if trim(as_tj[i])<>'' and not isnull(as_tj[i]) then if ls_filter<>'' then ls_filter=ls_filter+" and ("+as_tj[i]+")" else ls_filter="("+as_tj[i]+")" end if end if next return ls_filter // 使用例子 // function : wf_Filter() // 使用Event ID pbm_enchange
string ls_filter //模糊查找 ls_filter=sle_1.text if ls_filter='' or isnull(ls_filter) or ls_filter= '...' then is_filter[1]="" else is_filter[1]="((upper( dw_field) like '%"+upper(ls_filter)+"%'))" end if dw_orig.setfilter(gf_condition(is_filter)) dw_orig.filter()