Require indeapth explaination for Run script, Source script and Transform script

RameshreddyE
Tera Contributor

I have gone through multiple use cases for Transform scripts, Source script and Run script, But unable to understand that which script we use for which requirement or use case. So can any one help me in this.....

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@RameshreddyE 

I believe you are referring to scripts available during transformation

1) field map script -used to handle field map values

2) Run script option available in transform map - similar to onBefore

3) Transform scripts (onBefore, onStart, onAfter, onComplete) etc - different types based on diff requirements

good explanation here on sequence

Validating the order of execution for transform map scripts 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

View solution in original post

5 REPLIES 5

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @RameshreddyE 

 

https://www.servicenow.com/community/developer-forum/what-exactly-is-the-use-of-run-script-in-a-tran...

 

https://www.servicenow.com/community/now-platform-forum/difference-between-script-when-checked-quot-...

 

*************************************************************************************************************
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]

****************************************************************************************************************

Hi, 

Already i have gone through your explaination, but unable to get the logic. So can you please explain it in a simple way....

Hi @Sandeep Rajput  @Deepak Negi @AshishKM experts can you help here.

*************************************************************************************************************
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]

****************************************************************************************************************

Sandeep Rajput
Tera Patron
Tera Patron

@RameshreddyE Here are some explanations.

 

Run Script: Run script is usually used in case of a workflow activity to perform CRUD (Create, Read, Update, Delete) operation on a table. Run script only runs inside a workflow.

https://www.servicenow.com/docs/bundle/xanadu-servicenow-platform/page/administer/workflow-activitie...

 

Transform Script: As the name suggests, transform scripts are used to transform the data of an import/staging table to data which the target table expects. E.g. Staging table contains an email id field, this field is used in the transform script to fetch the user id of an existing user.

https://developer.servicenow.com/dev.do#!/learn/courses/xanadu/app_store_learnv2_importingdata_xanad...