How to update records in target table using transform map
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2023 09:19 PM - edited 06-07-2023 09:23 PM
Hi All,
I want to update records , I am using coalesce on name field but i want to update only active records in target table.
how can i achieve that. I am using before transform script ,but it is not updating the records where active is true and name field has a duplicate(one as active=false).
if(action == "insert"){
ignore = true;
}
if(action=="update" && target.active == true){
action="update";
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2023 01:08 AM
if it's coming inside the IF then that row should be ignored
I hope you have created this script in onBefore transform script
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2023 01:11 AM - edited 06-08-2023 01:52 AM
yes, it is a onbefore one. yeah but the active one should be updated right?
it also shows target as empty
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2023 02:18 AM
sorry to say.
It's very difficult to understand without the screenshots.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader