When checking for changes in the values of a couple of variables, I use the following condition:
<%
if (ctx.recipient.@firstName != ctx.recipient.@firstName_init || ctx.recipient.@lastName != ctx.recipient.@lastName_init || ctx.recipient.@emailPreferredName != ctx.recipient.emailPreferredName_init)
{
document.controller.setValue('/ctx/vars/piiChanges',1);
}
%>
I am looking to identify which specific condition has had its value changed out of the 3 conditions. How can this be achieved?
Below is the XML payload being used:
<recipient JOB_TITLE=""
blackListEmail="0"
cmOneID="0"
company=""
email="<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="c8acbda5a5b188acbda5a5b1e6aba7a5f9">[email protected]</a>"
emailPreferredName="Dummy1"
firstName="Dummy1"
id="13246096"
initiative=""
investorType=""
jurisdiction=""
lastName="Dummy1"
lawfulBasisLabel="None"
lawfulBasisName="none"
leadScore="0"
origin=""
status="0"
statusLabel="Other"
statusName="other"
_operation="update"
_key="@id"
firstName_init="Dummy"
lastName_init="Dummy"
email_init="<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="482c3d252531082c3d252531662b2725">[email protected]</a>"
emailPreferredName_init="Dummy"
blackListEmail_init="0">
<postalAddress addrDefined="0"/>