- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2023 08:53 AM - edited 12-20-2023 09:12 AM
Hey all,
I've got couple of Transform Maps which are part of SNOW integration. I've made these Inactive before but this causes another issue, when inactive it stops the other transform maps from running and holds a backlog of the data that it tried to run.
Currently they are Active but the snow job is disabled so I don't process these two.
What I want to do is to keep these Transform Maps active but not process any of the data so it can move to the next Transform Maps.
These are the fields in one of them:
and one onBefore Transform Script, but no Run script for the Table Transform Map.
Any suggestions what I can do to make this possible?
Kind regards
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2024 07:11 AM
Hey all.
I've implemented a run script which allows the transform maps to execute but skip all the records if any of the fields have data in them.
This will make sure the next transform maps run. This is in context to Snow Software application.
Steps:
- Type snow in your 'Filter'
- Scroll down to 'Transform Maps' under 'Transforms'
- Choose your transform map and open in new window
- Tick the 'Run script' option
- Enter the following script
- Make sure to amend the field names to match yours. i.e. source.your_field_name
/*
Script for Transform Map: SnowTranformMap
Purpose: Conditionally ignore updates based on the presence of values in certain source fields.
Record any relevant data and changes for documentation purposes.
*/
// Check conditions to determine whether to ignore updates
if (action == 'insert' && (source.u_freespacemb || source.u_sizemb || source.u_volumename || source.u_discoverysource || source.u_computerid || source.u_name)) {
// Log a message for documentation
gs.log("Ignored due to importing a record with values in u_freespacemb, u_sizemb, u_volumename, u_discoverysource, u_computerid, or u_name - " + source.u_name);
// Set ignore to true to skip the entire Transform Map and ignore updates
ignore = true;
}
Hope this helps.
Kind regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2023 09:43 AM
Hi @Owais3
It's SN or ServiceNow not SNOW
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
12-20-2023 09:53 AM
Hey @Dr Atul G- LNG
I did mention SNOW Integration. You're a ServiceNow Techno? A quick google would have put you in the right direction.
Snow for ServiceNow
https://www.snowsoftware.com/products/snow-servicenow/
Funny post though, made me laugh!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2024 07:11 AM
Hey all.
I've implemented a run script which allows the transform maps to execute but skip all the records if any of the fields have data in them.
This will make sure the next transform maps run. This is in context to Snow Software application.
Steps:
- Type snow in your 'Filter'
- Scroll down to 'Transform Maps' under 'Transforms'
- Choose your transform map and open in new window
- Tick the 'Run script' option
- Enter the following script
- Make sure to amend the field names to match yours. i.e. source.your_field_name
/*
Script for Transform Map: SnowTranformMap
Purpose: Conditionally ignore updates based on the presence of values in certain source fields.
Record any relevant data and changes for documentation purposes.
*/
// Check conditions to determine whether to ignore updates
if (action == 'insert' && (source.u_freespacemb || source.u_sizemb || source.u_volumename || source.u_discoverysource || source.u_computerid || source.u_name)) {
// Log a message for documentation
gs.log("Ignored due to importing a record with values in u_freespacemb, u_sizemb, u_volumename, u_discoverysource, u_computerid, or u_name - " + source.u_name);
// Set ignore to true to skip the entire Transform Map and ignore updates
ignore = true;
}
Hope this helps.
Kind regards