Error while creating conditional content in HTML of the delivery template | Community
Skip to main content
Level 2
October 11, 2023
Solved

Error while creating conditional content in HTML of the delivery template

  • October 11, 2023
  • 1 reply
  • 764 views

Hi there!

 

I am trying to create  conditional content based on the segment code i have created in my workflow:

 

But when i try to send the delivery, this error happens:

JST-310000 Error while compiling script 'content htmlContent' line 4: invalid XML name (line=' if ( <targetData.segmentCode> == <"info"> ) { document.writeraw("info"); ' token='"info"> ) { document.writeraw("info"); ').

 

Could anyone help me?

 

Thank you team

 

 

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

Hi @javi_landa ,

Modify your condition as below,

<% if ( targetData.segmentCode == "info" ) { %> Insert content here <% } else { %> Insert content here <% } %>

1 reply

ParthaSarathy
Community Advisor
ParthaSarathyCommunity AdvisorAccepted solution
Community Advisor
October 11, 2023

Hi @javi_landa ,

Modify your condition as below,

<% if ( targetData.segmentCode == "info" ) { %> Insert content here <% } else { %> Insert content here <% } %>
~  ParthaSarathy S~  Click here to join ADOBE CAMPAIGN USER GROUP for Quarterly In-person | Hybrid | Virtual Meetups