- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2021 08:00 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2021 08:08 PM
OnAfter - It is almost similar to an onAfter business rule and you could use it to write any businss logic to be executed on other related tables. For eg when transforming users, you can add users to group or users with roles in an on After script.
OnComplete - Once the entire list of rows are transformed, the onComplete script is triggerred. You could acccess the entire import set in here and process any required logic on the entire rows imported. Since transform map executes row by row, you cannot apply a logic if first row is dependent on the last row and similar logic can be accomplished using it. It can also be used for adding logs or triggering any emails after transform.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2021 08:08 PM
OnAfter - It is almost similar to an onAfter business rule and you could use it to write any businss logic to be executed on other related tables. For eg when transforming users, you can add users to group or users with roles in an on After script.
OnComplete - Once the entire list of rows are transformed, the onComplete script is triggerred. You could acccess the entire import set in here and process any required logic on the entire rows imported. Since transform map executes row by row, you cannot apply a logic if first row is dependent on the last row and similar logic can be accomplished using it. It can also be used for adding logs or triggering any emails after transform.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2021 11:25 PM
Thanks for responding.
But there are cases where it seems both can work then how to choose? Is there a good practice suggested?
For example: I imported records in a table and the state was open. Now I want to change th state to WIP. Now I have done it with onAfter but as per your suggestion I should have used oncOMPLETE as I want to update for all the rows.
So which is the best way to do it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2021 11:34 PM
Is there a dependency on the other rows, where you need to update state of row 1 only if row 10 is present? If yes you could do it in the onComplete script but if you are just updating state of all rows to Open then you should place it in onAfter script as it is direct application of logic to the same row or record.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2021 12:44 AM
No dependency, update for all rows.
Used onAfter.