- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2023 03:36 AM
Hi friends,
I am writing transform map script onBefore() :
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2023 04:12 AM
Hello @Shrikant Pathak,
I was asking myself the same question a few months ago. It really depends on what your case is. Based on one KB article - Transform Maps - Order of execution
Resolution
- Run the onStart script
- Find the target record by evaluating all coalesce field maps/scripts.
- Before any other scripts are executed, the target record is found.
- Run the onBefore script.
- Since this is executed after finding the target record, you need to make sure the coalesce scripts do not depend on any variables defined here in the onBefore script.
- Transform all field mappings.
- Run the main transform Run script.
- This is the main script in the transform map which is visible only when "Run Script" is checked.
- Run the onAfter script.
- Repeat 2-6 for all import set rows.
- Run the onComplete script.
I think that you need to check at what point of the execution of the transform map you want the script to be executed, and yes they are going to do basically the same.
Hope that this helps you!
If the provided information answers your question, please consider marking it as Helpful and Accepting the Solution so other community users can find it faster.
All the Best,
Stefan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2023 04:12 AM
Hello @Shrikant Pathak,
I was asking myself the same question a few months ago. It really depends on what your case is. Based on one KB article - Transform Maps - Order of execution
Resolution
- Run the onStart script
- Find the target record by evaluating all coalesce field maps/scripts.
- Before any other scripts are executed, the target record is found.
- Run the onBefore script.
- Since this is executed after finding the target record, you need to make sure the coalesce scripts do not depend on any variables defined here in the onBefore script.
- Transform all field mappings.
- Run the main transform Run script.
- This is the main script in the transform map which is visible only when "Run Script" is checked.
- Run the onAfter script.
- Repeat 2-6 for all import set rows.
- Run the onComplete script.
I think that you need to check at what point of the execution of the transform map you want the script to be executed, and yes they are going to do basically the same.
Hope that this helps you!
If the provided information answers your question, please consider marking it as Helpful and Accepting the Solution so other community users can find it faster.
All the Best,
Stefan