Skip to main content
Level 2
Apr 29, 2024 1:25 PM UTC
Solved

Email Address Data policy

Hi ,

 

I'm facing an error in JavaScript activity while attempting to remove invalid email addresses from the data loading activity.

Technical workflow:

 

This is the code I used to identify invalid email addresses from the data loading activity:


The error is :



This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
ParthaSarathy
ParthaSarathyAccepted solution
Community Advisor
Apr 29, 2024 1:37 PM UTC

Hi @dhanam1 ,

In data loading activity > click here to change the file format > See the internal name of 'email' column. 

 

If the internal name is 'email', then in JS modify the select node @email as email

Example,

var query = xtk.queryDef.create( <queryDef schema="temp:fileImport" operation="select" > <select> <node expr="email"/> </select> </queryDef> ); var record = query.ExecuteQuery(); for each (var variable in record) { vars.emailID = variable.email; logInfo("emailID: "+vars.emailID); }

 

~  ParthaSarathy S

6 replies

Adobe Employee
Apr 29, 2024 1:30 PM UTC

Hi @dhanam1 ,

In your query dataPlocy activity, you need to add the email address as Additional data.....

Thanks

Denis

Translate
ParthaSarathy
Community Advisor
ParthaSarathyCommunity AdvisorAccepted solution
Community Advisor
Apr 29, 2024 1:37 PM UTC

Hi @dhanam1 ,

In data loading activity > click here to change the file format > See the internal name of 'email' column. 

 

If the internal name is 'email', then in JS modify the select node @email as email

Example,

var query = xtk.queryDef.create( <queryDef schema="temp:fileImport" operation="select" > <select> <node expr="email"/> </select> </queryDef> ); var record = query.ExecuteQuery(); for each (var variable in record) { vars.emailID = variable.email; logInfo("emailID: "+vars.emailID); }

 

Translate
~  ParthaSarathy S
Dhanam1Author
Level 2
May 2, 2024 7:09 AM UTC

Hi @parthasarathy  ,
I can retrieve both valid and invalid email addresses from the Javascript activity, but I want to separate them into different transitions—one for valid (true) and one for invalid (false)—using the Test activity.


 

Translate
CampaignerForLife
Level 5
Apr 30, 2024 7:19 AM UTC

Have you checked the definition of datapolicy? maybe the expression is "@email" or even "email"

Translate
Dhanam1Author
Level 2
Apr 30, 2024 9:15 AM UTC

the expression is "email" only.

Translate
CampaignerForLife
Level 5
Apr 30, 2024 9:19 AM UTC

Nice! So, is your problem solved already? 

 

Translate