Skip to Content
0

Exceptions in Fox foreach statement

Apr 16 at 08:56 AM

24

avatar image

Hello ,

Is it possible to prevent a Forloop to execute for a particular value?

For eg:

DATA PRODUCT TYPE ZPRODUCT.

FOREACH PRODUCT.

{KEYFIG,PRODUCT} = {KEYFIG,PRODUCT}*1.2

ENDFOR.

But i do not want this calculation to happen for a particular product. Lets say 0PRODUCT=X.

Is there any way like combining DO LOOP and IF Statement?

Thank you,

Arjun

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Cornelia Lezoch Apr 17 at 07:56 AM
0

FOREACH PRODUCT.

If PRODUCT <> x.

{KEYFIG,PRODUCT} = {KEYFIG,PRODUCT}*1.2.

endif.

ENDFOR.

Share
10 |10000 characters needed characters left characters exceeded
Anand Kumar Apr 16 at 09:05 AM
0

hi,

try with IF statement.

Regards,

Anand

Share
10 |10000 characters needed characters left characters exceeded