3 Replies Latest reply: Apr 15, 2011 7:50 AM by Fernando Suzuki RSS

    Variables in a for Loop

    Sravan Puppala

      hi I have two variables

      Let vCurWeek = replace(WeekName(Today()), '/', '');
      Let vLastWeek = Replace(WeekName(Today()-7), '/', '');

      which gives me vCurWeek=201115 and vLastWeek=201114

      now I want a loop

      For i= 0 to 'End of period'

      That means for Example if I consider 4 weeks[201114-201117)

      How to use that variable in a loop like

      For i= 0 to ($(vLastWeek)+4)-1

      ....

      Next i

      This does not work. Any idea?

      Regards

      Sravan