Expand my Community achievements bar.

Adobe Campaign User Groups are live now. Join our Adobe Campaign User Groups and connect with your local leaders!
SOLVED

If/Else statement help - error

Avatar

Level 1

Hello,

I am configuring a simple if else statement to display content based on data being passed in targetdata in the workflow.  Here is my statement.  I have tested the "if" part alone and it works fine but once I add in the Else, I get the following error.


<% if ( targetData.segment == "A" ) { %>

HELLO

<% } %>

 


<% else { %>

GOODBYE

<% } %>

 

KristenCo4_0-1718978089715.png

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi,

 

try this 

 

<% if ( targetData.segment == "A" ) { %>

HELLO
<% } else { %>

GOODBYE

<% } %>

 

Thanks,

David



David Kangni

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

Hi,

 

try this 

 

<% if ( targetData.segment == "A" ) { %>

HELLO
<% } else { %>

GOODBYE

<% } %>

 

Thanks,

David



David Kangni

Avatar

Level 1

Thank you David.  That worked!  It seems on V8, the function is not correct.  I took it directly from Adobe here-

<% else { %>

Insert content here

<% } %>

KristenCo4_0-1718993569768.png