>>>Procedure updLabel >>> Lparameters p1, p2, p3, p4 >>> SELECT cpplan >>> For x=1 to 4 >>> replace cpplan.expr WITH Evaluate('p'+Transform(x)) >>> skip >>> Next >>>EndProc >>>>>>>Is there anyway I can cut this code down maybe using a for statement or something?
>>>>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 >>>>