Expand my Community achievements bar.

SOLVED

Email Address Data policy

Avatar

Level 2

Hi ,

 

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

Technical workflow:

Dhanam1_0-1714396667322.png

 

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

Dhanam1_1-1714396734610.png


The error is :

Dhanam1_2-1714396854542.png



1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @Dhanam1 ,

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

ParthaSarathy_0-1714397716436.png

 

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);
}

 

View solution in original post

6 Replies

Avatar

Employee

Hi @Dhanam1 ,

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

Thanks

Denis

Avatar

Correct answer by
Community Advisor

Hi @Dhanam1 ,

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

ParthaSarathy_0-1714397716436.png

 

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);
}

 

Avatar

Level 2

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.


Dhanam1_0-1714632821656.png

 

Avatar

Level 7

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