cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

conditional logic *when

Former Member
0 Likes
336

Hi Bpc Friends

I have a script with the following conditional logic but I don't understand the code

[ENTITY].[DEFAULT],[PRODUCTGRP].[NO_PRODGRP])>0

*WHEN COSTCENTRE
*IS *
*REC(FACTOR=(([ENTITY].[DEFAULT],[PRODUCTGRP].[NO_PRODGRP])>0),COSTCENTRE=GSSALLOC_REV)
*ENDWHEN

Accepted Solutions (1)

Accepted Solutions (1)

former_member186338
Active Contributor
0 Likes

Ternary syntax will be:

([ENTITY].[DEFAULT],[PRODUCTGRP].[NO_PRODGRP])>0 ? 1 : 0

Condition ? ValueIfTrue : ValueIfFalse

Factor will be equal to 1 if true and 0 if false

Former Member
0 Likes

thanks Vadim

Answers (1)

Answers (1)

former_member186338
Active Contributor
0 Likes

old syntax! Rewrite using ternary operator.