Focal Point
Multiple multiselect parameters

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/1451088331

August 01, 2005, 03:40 PM
Bethany
Multiple multiselect parameters
I have 2 multiselect drop downs in the html form. It works when only variables are selected for one option but when variables are selected for both, the report never finishes running.

-IF &INDCD.EXISTS NE 1 THEN GOTO ENDLOOP;
WHERE SRVC_SERVICE_IND_CD EQ '&INDCD'
-IF &INDCD0.EXISTS THEN GOTO NEXT_STEP ELSE GOTO ENDLOOP;
-NEXT_STEP
-REPEAT ENDLOOP FOR &COUNTERA FROM 2 TO &INDCD0;
OR '&INDCD.&COUNTERA'
-ENDLOOP
-IF &DEPT.EXISTS NE 1 THEN GOTO ENDLOOP;
WHERE SRVC_DEPARTMENT EQ '&DEPT'
-IF &DEPT0.EXISTS THEN GOTO NEXT_STEP ELSE GOTO ENDLOOP;
-NEXT_STEP
-REPEAT ENDLOOP FOR &COUNTERB FROM 2 TO &DEPT0;
OR '&DEPT.&COUNTERB'
-ENDLOOP

Thanks for your help.
August 01, 2005, 03:56 PM
mgrackin
Bethany, You have the -ENDLOOP label in two places in your code. Change one of the ENDLOOP labels to a different word and this will prevent the infinite loop you are getting into.
August 01, 2005, 04:24 PM
Bethany
Thanks for your help. Now it works for a multiselect for one variable along with a single selection for the 2nd variable, but trying to use multiple selections for both variables still won't finish running. Any ideas?
August 01, 2005, 06:02 PM
j.gross
did you chg all references to ENDLOOP in the 2nd repeat loop, along with the -ENDLOOP label, to (say) ENDLOOP2?
August 01, 2005, 07:06 PM
Bethany
Thanks Jack! Works like a charm now.
August 02, 2005, 11:47 AM
mgrackin
Sorry about that. I meant what Jack said as well but didn't word it correctly in my post. Sorry for the confusion.
August 02, 2005, 02:34 PM
Vivian
You also have the label next_step used twice. One of them should be given a different name and with all references to it as well - just like the endloop. Just in case you run into trouble with that....