Skip to Content
0
Nov 10, 2010 at 05:59 PM

Prompt Variables into Script Logic

64 Views

Hello:

I want to pass dynamic values from prompt to script logic:

*XDIM_MEMBERSET INDICADORES=PORDIST,NAINDI,PORAJU,PORTOTAL

*XDIM_MEMBERSET LINEA=NALINEA

*WHEN INDICADORES

*IS PORDIST,PORAJU,PORTOTAL

*FOR %YEAR% = %anio%

*FOR %MONTH% = JAN,FEB,MAR,APR,MAY,JUN,JUL,AUG,SEP,OCT,NOV,DEC

*REC(FACTOR=-1, TIEMPO="%YEAR%.%MONTH%")

*NEXT

*NEXT

*ENDWHEN

*COMMIT

My variable is %anio%... If the user insert 2010 in the prompt, i Want 2010 to be there.

How can I do this?

This my package:

DEBUG(ON)

PROMPT(RADIOBUTTON,%CHECKLCK%,"Select whether to check work status settings when running logic.",1,{"Yes, check for work status settings before running logic","No, do not check work status settings"},{"1","0"})

PROMPT(TEXT,%anio%,"Elegir año",,"")

TASK(Execute formulas,USER,%USER%)

TASK(Execute formulas,APPSET,%APPSET%)

TASK(Execute formulas,APP,%APP%)

TASK(Execute formulas,SELECTION,%SELECTIONFILE%)

TASK(Execute formulas,LOGICFILE,%APPPATH%..AdminApp%APP%Copy - NA-Month.lgx)

TASK(Execute formulas,FORMULASCRIPT,"*FUNCTION LOGICPARAM=%anio%|")

TASK(Execute formulas,RUNMODE,1)

TASK(Execute formulas,LOGICMODE,1)

TASK(Execute formulas,CHECKLCK,%CHECKLCK%)

The error Messa ge is: Invalid Selection%

Thanks in advance

Luciana