- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2023 08:52 AM - edited 11-13-2023 08:54 AM
Hello,
What happens if I have more than one onBefore transform map script?
The system only runs the first one and stops the execution?
Or the system runs the one with lower order first, and after that, the next one?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2023 09:06 AM
Hi @Facundo Alves ,
In ServiceNow, during the execution of onBefore transform map scripts, the system processes them in ascending order determined by the order field. Lower order values take precedence, meaning a script with order 50 will be executed before a script with order 100.
Please mark it as helpful and solution proposed if it serves your purpose.
Thanks,
Anand
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2023 09:06 AM
Hi @Facundo Alves ,
In ServiceNow, during the execution of onBefore transform map scripts, the system processes them in ascending order determined by the order field. Lower order values take precedence, meaning a script with order 50 will be executed before a script with order 100.
Please mark it as helpful and solution proposed if it serves your purpose.
Thanks,
Anand
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2023 09:17 AM
What happens if the first onBefore script is setting the variable "ignore" to true?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2023 09:38 PM
Hi @Facundo Alves ,
If the ignore variable is set to true in any of the onBefore scripts, it will skip the current row being transformed, but the system will continue to execute the subsequent onBefore scripts.
Please mark it as helpful and solution proposed if it serves your purpose.
Thanks,
Anand
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2023 09:08 AM
It will run all the active transform scripts as per the order.
Lowest to the Highest order.
Thanks!
Please mark it as correct and helpful 🙂