cancel
Showing results for 
Search instead for 
Did you mean: 

HOW TO CHECK THE VALUE OF SIGNEDDATA IN LOGIC SCRIPT

former_member339201
Participant
0 Kudos

Hello Experts,

I have the following scenario.

Account     Entity     Currency     Time     Product     Category

A

B

C

D

E

There are two calculations involved:

A = B* C

A = D*E

But the check is that if value of Account D is present for same combination of Product , Entity and Category then calculation for A should be like :

A = D* E

the following calculation holds only when there is no data against ACCOUNT D :

A = B*C

I need to implement this via script logic but not finding a way to check the value of SIGNEDDATA.

Pls suggest.

Regards,
SHUBHAM

Accepted Solutions (1)

Accepted Solutions (1)

former_member186338
Active Contributor
0 Kudos

Easy:

*WHEN ACCOUNT

*IS E

*REC(EXPRESSION=([ACCOUNT].[D])==0 ? [ACCOUNT].[B]*[ACCOUNT].[C] : %VALUE%*[ACCOUNT].[D],ACCOUNT=A)

may be some extra when/endwhen will be required for B and C

former_member186338
Active Contributor
0 Kudos

P.S. You have to specify requirements in full details like:

If D - empty, E - value, B-?, C-?

If D - =0, E - value,...

If D - value, E - value

Etc... all possible combinations of A,B,C,D

former_member339201
Participant
0 Kudos

Thanks Vadim,

If we have to add multiple conditions which may incude AND/OR situations, then how do we deal with this conditional statements like in your above example :

*REC(EXPRESSION=([ACCOUNT].[D])==0 ? [ACCOUNT].[B]*[ACCOUNT].[C] : %VALUE%*[ACCOUNT].[D],ACCOUNT=A)


If I need to add a more condition based on which the expression should execute and condition is like :


IF ACCOUNT D == 0 or ACCOUNT F =0 then execute the expression..



former_member186338
Active Contributor
0 Kudos

No multiple conditions supported. In some cases it can be arranged with ternary operator inside another ternary operator or some other options.

There is no universal solution, you have to precisely explain all conditions and all cases!

Answers (0)