Skip to main content
Dec 1, 2021 7:34 PM UTC
Question

Logical AND operator not giving me correct result for Dynamic Value

I'm Trying to figure out greater value figure out greater value from 3 value. But I'm not getting expected result.

 

I have enrich the data and created three variables  OpenRatioOfA, OpenRatioOfB, OpenRatioOfC.

 

Values are : 

OpenRatioOfA = 8.70

OpenRatioOfB = 2.00

OpenRatioOfC = 0.00

 

if I use this below simple condition expression I am getting correct result.

 

Iif(OpenRatioOfA >= OpenRatioOfB , 'A', 'NEXT') // I got A as ouptput

 

But whenever I use Logical AND operator it's not giving me correct result

 

Iif(OpenRatioOfA >= OpenRatioOfB AND OpenRatioOfA >= OpenRatioOfC, 'A', 'NEXT') 

 

(NOT WORKING)

// Expected Ans = A but getting NEXT

 

Why this logical AND operator not working in ACS though expression look so simple. Please help me in this. Thanks in advance.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

6 replies

SatheeskannaK
Adobe Champion, Community Advisor, UG Leader
Adobe Champion, Community Advisor, UG Leader
Dec 1, 2021 8:01 PM UTC

@pawan_maurya ,

Are you doing this within delivery template? If so take a look at this documentation on how to use logical operator on expressions vs java script.

https://experienceleague.adobe.com/docs/campaign-standard/using/managing-processes-and-data/filtering-data/advanced-expression-editing.html?lang=en

 

Thanks!

Translate
Thanks, Sathees
Dec 1, 2021 8:10 PM UTC

@satheeskannak  Thanks for your response. I am trying this expression in enrichment activity.

 

Variables are respectively 

OpenRatioOfA = 8.70

OpenRatioOfB = 2.00

OpenRatioOfC = 0.00

 

 

 

 

Thanks

 

Translate
SatheeskannaK
Adobe Champion, Community Advisor, UG Leader
Adobe Champion, Community Advisor, UG Leader
Dec 1, 2021 9:07 PM UTC

@pawan_maurya AND operator is correct in this case. I did try with this condition and getting expected result.

 

Translate
Thanks, Sathees
Dec 1, 2021 9:13 PM UTC

Can You please show me what you have tried..

@satheeskannak 

 

I hope you didnt use static value in the expresion like this

Iif((8.70 >= 2.00) AND (8.70>=0.00), 'A', 'NEXT')

 

thanks

Translate
SatheeskannaK
Adobe Champion, Community Advisor, UG Leader
Adobe Champion, Community Advisor, UG Leader
Dec 6, 2021 2:31 PM UTC

@pawan_maurya Apologize for the late reply. You can see screenshot which i shared earlier. Were you able to resolve the error?

Translate
Thanks, Sathees
Sukrity_Wadhwa
Level 4
Dec 16, 2021 7:37 AM UTC

Hi @pawan_maurya,

Were you able to resolve this query with the help of the given solution or do you still need more help here? Do let us know.
Thanks!

Translate
Sukrity Wadhwa