Issue in personalization block when added in hyperlink

Avatar

Avatar

Ramaswami

Avatar

Ramaswami

Ramaswami

14-07-2020

Hi Team, 

 

Below is the personalization block i have written to use in delivery : 

 

personalization block: name = "ExitSurvey"

<%
if ( dataSource.Job_Category== 'Corporate' ) { %>1<%
} %><%
else if ( dataSource.Job_Category== 'Call Center' ) { %>2<%
} %><%
else if ( dataSource.Job_Category== 'XXX' ) { %>3<%
} %><%
else { %>0<%
} %>

 

when i am including this in <a> tag's href it's showing me all the results - 1230 

when i am including it normally it is giving results based on the reicipient picked. 

 

<a href="https://domain/6CD9B920/G10DF6LT/en-US?type=<%@ include view='ExitSurvey' %>" target="_blank">https://domain/6CD9B920/G10DF6LT/en-US?type=<%@ include view='ExitSurvey' %></A>

 

result : if i my job is 'corporate'

this is the hyper link i am seeing : https://domain/6CD9B920/G10DF6LT/en-US?type=1

but when i click on the hyperlink it is redirecting me tohttps://domain/6CD9B920/G10DF6LT/en-US?type=1230

type = 1230 ( it's not using the conditional operator at all)

 

 

Accepted Solutions (0)

Answers (1)

Answers (1)

Avatar

Avatar

_Manoj_Kumar

MVP

Avatar

_Manoj_Kumar

MVP

_Manoj_Kumar
MVP

14-07-2020

Hello @Ramaswami 

What is the relationship between recipient and the DataSource schema?

Is it one to one or one to Many?

Your logic should work if it is one to one.

Could you please share more details?