- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
5 hours ago
In a ServiceNow Transform Map, how can you restrict the insertion of new records and allow only updates to existing records during data import?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
5 hours ago
In transform map main script, we can check for operation by using 'action' variable and set 'ignore' variable as true/false based on the value as shown in below script :
if(action=='insert'){
ignore=true;
}
If you found my response helpful, I would greatly appreciate it if you could mark it as "Accepted Solution" and "Helpful."
Your support not only benefits the community but also encourages me to continue assisting. Thank you so much!
Thanks and Regards
Ravi Gaurav | ServiceNow MVP 2025,2024 | ServiceNow Practice Lead | Solution Architect
CGI
M.Tech in Data Science & AI
ï”— YouTube: https://www.youtube.com/@learnservicenowwithravi
ï”— LinkedIn: https://www.linkedin.com/in/ravi-gaurav-a67542aa/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
5 hours ago
Below Will help you to understand Transform Map !!
https://www.servicenow.com/docs/bundle/zurich-integrate-applications/page/script/server-scripting/co...
If you found my response helpful, I would greatly appreciate it if you could mark it as "Accepted Solution" and "Helpful."
Your support not only benefits the community but also encourages me to continue assisting. Thank you so much!
Thanks and Regards
Ravi Gaurav | ServiceNow MVP 2025,2024 | ServiceNow Practice Lead | Solution Architect
CGI
M.Tech in Data Science & AI
ï”— YouTube: https://www.youtube.com/@learnservicenowwithravi
ï”— LinkedIn: https://www.linkedin.com/in/ravi-gaurav-a67542aa/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
5 hours ago
use the coalesce.
Coalesce is commonly used with Transform maps in ServiceNow. It is used to set a field as unique, so that when data is imported :
- If ServiceNow identifies the data against an existing record using Coalesce, then it will update that record.
- If ServiceNow identifies the data against no existing records, it creates a new one.
So lets take this as a simple example, we want to load the below User information through Transform Maps into our User table. We set Employee ID as the Coalesce field
Here is the data we are loading in.
Employee ID | Name | Country | Role |
001 | John | Ireland | Sales |
002 | Sarah | England | IT |
003 | Amy | Scotland | HR |
004 | Brad | America | Marketing |
Here is the data that exists in the User table already
Employee ID | Name | Country | Role |
001 | John | Sales | |
002 | Sarah | England | |
003 | Scotland | HR |
Here is what the table would look like after the transform map runs
Employee ID | Name | Country | Role |
001 | John | Ireland | Sales |
002 | Sarah | England | IT |
003 | Amy | Scotland | HR |
004 | Brad | America | Marketing |
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
5 hours ago
In transform map main script, we can check for operation by using 'action' variable and set 'ignore' variable as true/false based on the value as shown in below script :
if(action=='insert'){
ignore=true;
}
If you found my response helpful, I would greatly appreciate it if you could mark it as "Accepted Solution" and "Helpful."
Your support not only benefits the community but also encourages me to continue assisting. Thank you so much!
Thanks and Regards
Ravi Gaurav | ServiceNow MVP 2025,2024 | ServiceNow Practice Lead | Solution Architect
CGI
M.Tech in Data Science & AI
ï”— YouTube: https://www.youtube.com/@learnservicenowwithravi
ï”— LinkedIn: https://www.linkedin.com/in/ravi-gaurav-a67542aa/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
5 hours ago
Below Will help you to understand Transform Map !!
https://www.servicenow.com/docs/bundle/zurich-integrate-applications/page/script/server-scripting/co...
If you found my response helpful, I would greatly appreciate it if you could mark it as "Accepted Solution" and "Helpful."
Your support not only benefits the community but also encourages me to continue assisting. Thank you so much!
Thanks and Regards
Ravi Gaurav | ServiceNow MVP 2025,2024 | ServiceNow Practice Lead | Solution Architect
CGI
M.Tech in Data Science & AI
ï”— YouTube: https://www.youtube.com/@learnservicenowwithravi
ï”— LinkedIn: https://www.linkedin.com/in/ravi-gaurav-a67542aa/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
5 hours ago
use the coalesce.
Coalesce is commonly used with Transform maps in ServiceNow. It is used to set a field as unique, so that when data is imported :
- If ServiceNow identifies the data against an existing record using Coalesce, then it will update that record.
- If ServiceNow identifies the data against no existing records, it creates a new one.
So lets take this as a simple example, we want to load the below User information through Transform Maps into our User table. We set Employee ID as the Coalesce field
Here is the data we are loading in.
Employee ID | Name | Country | Role |
001 | John | Ireland | Sales |
002 | Sarah | England | IT |
003 | Amy | Scotland | HR |
004 | Brad | America | Marketing |
Here is the data that exists in the User table already
Employee ID | Name | Country | Role |
001 | John | Sales | |
002 | Sarah | England | |
003 | Scotland | HR |
Here is what the table would look like after the transform map runs
Employee ID | Name | Country | Role |
001 | John | Ireland | Sales |
002 | Sarah | England | IT |
003 | Amy | Scotland | HR |
004 | Brad | America | Marketing |
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
5 hours ago
Thanks @Ravi Gaurav the code worked for me.. thanks @Dr Atul G- LNG it helped me understand more in depth. your videos are good