Transform map order Execution

Facundo Alves
Tera Contributor

Hello,

 

What happens if I have more than one onBefore transform map script?

 

FacundoAlves_0-1699894321728.png

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?

1 ACCEPTED SOLUTION

Anand Kumar P
Giga Patron
Giga Patron

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

View solution in original post

4 REPLIES 4

Anand Kumar P
Giga Patron
Giga Patron

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

What happens if the first onBefore script is setting the variable "ignore" to true?

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

Shubham Singh
Mega Guru

Hi @Facundo Alves 

 

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 🙂