Issue in personalization block when added in hyperlink | Community
Skip to main content
Level 4
July 14, 2020
Question

Issue in personalization block when added in hyperlink

  • July 14, 2020
  • 1 reply
  • 1537 views

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)

 

 

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

1 reply

Manoj_Kumar
Community Advisor
Community Advisor
July 14, 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?

Manoj     Find me on LinkedIn
RamaswamiAuthor
Level 4
July 15, 2020

No relationship, i am directly using the excel sheet to send emails. On delivery i used target mapping as - "External file" with not adding the respondents into recipient schema.