Skip to Content
0
Former Member
Apr 28, 2010 at 04:09 AM

Apply variable to script logic FOR / NEXT statement

611 Views

Hi experts,

Example:

*FOR %PeriodLoop2%=0,1,2,3,4,5

*REC(EXPRESSION=GET(time=Next(%PeriodLoop2%)),category=%PlanCategory%,PlanItem= #RP420004accl,time=Next(%input%))

*NEXT

I wish to have the number of loop time is feasible........

%input% is user input number....

My question is can I have 0,1,2,3,4,5 become user input variable.

Meaning

if user input is 6 then I will have %PeriodLoop2%=0,1,2,3,4,5

if user input is 9 then I will have %PeriodLoop2%=0,1,2,3,4,5,6,7,8

if user input is 12 then I will have %PeriodLoop2%=0,1,2,3,4,5,6,7,8,9,10,11

IS it posibble to do this???