cancel
Showing results for 
Search instead for 
Did you mean: 

Can someone give we script to BREAK a WHILE loop?

Former Member
0 Kudos

I would like to BREAK a WHILE loop for a particular condition.
but BREAK or EXIT don work in BODS script. Kindly let me know if there is another option.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member208402
Active Contributor

for that particular condition write script to make the WHILE condition false (inside loop)

suppose if your while condition is $WHILE='TRUE'

for any particular condition write script using IF condition

IF ( ) --- Here write your particular condition

$WHILE='FALSE'

else

$WHILE='TRUE'

if FALSE, then it comes out of loop.

former_member187605
Active Contributor
0 Kudos
You don't even need the else-part. Because $WHILE is 'TRUE' already (otherwise you wouldn't be in the loop), why would you assign it the same value again?