>PROCEDURE UpdLabel > LPARAMETERS lcfieldlabel1, lcfieldlabel2, lcfieldlabel3, lcfieldlabel4 > SELECT cpplan > replace cpplan.expr WITH "'"+ALLTRIM(lcfieldlabel1)+"'" &&lcfieldlabel1 > SKIP > replace cpplan.expr WITH "'"+ALLTRIM(lcfieldlabel2)+"'" &&lcfieldlabel2 > SKIP > replace cpplan.expr WITH "'"+ALLTRIM(lcfieldlabel3)+"'" &&lcfieldlabel3 > SKIP > replace cpplan.expr WITH "'"+ALLTRIM(lcfieldlabel4)+"'" &&lcfieldlabel4 >ENDPROC >
LPARAMETERS m.tcfieldlabel1, m.tcfieldlabel2, m.tcfieldlabel3, m.tcfieldlabel4 LOCAL m.lnX FOR m.lnX = 1 to PCOUNT() REPLACE expr with "'"+ALLTRIM( eval('m.tcfieldlabel' + transform(m.lnX)))+"'" IN cpplan SKIP in cpplan ENDFOR m.lnX