
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-23-2018 04:44 AM
Hi Guys,
We are troubling with one issue using transform map. Briefly, We are getting the data form database view by using transform maps we are insert into user table.So we gave Coalesce to one unique field, still we are getting duplicate records in user table.
we are noticing the issue i.e., example if user has a different emails then it is inserting into user table.we have an unique email i'd and ending with our 'company name'. So we need only those records. How we can achieve this ???
Thanks,
Rakhesh
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-25-2018 01:53 AM
Hi Rakhesh,
Please mark it as correct or helpful if the issue is resolved.
Regards,
Ram M
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-23-2018 04:55 AM
Hi Rakhesh,
Please correct if my understanding is wrong. There were multiple users getting inserted for single users, this is because of multiple emails for the single user. And you need to insert or update the user with email ending with company name.
Please try using the onbefore transform script in order to abort the insertion of error records.
Regards,
Ram M

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-23-2018 05:01 AM
Hi Ram,
Thanks for replay, yes we tried onbefore transform script,still no luck. If you know please can you guide me to achieve this using of onbefore transform script.
Thanks,
Rakhesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-23-2018 05:07 AM
Hi Rakhesh,
Could you please provide the script that you have tried with.
Regards,
Ram M

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-23-2018 05:39 AM
HI Ram,
we are using this code but not sure we are freshers in servicenow if we are wrong guide me.
the code which we wrote is in beow
var email= source.u_emailid;
var gr = new GlideRecord('sys_user');
gr.addQuery('u_email', empId);
gr.query();
while(gr.next()){
if(action == insert){
ignore = true;
}
Thanks,
Rakhesh