- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2021 07:51 AM
I am trying to update email, phone and location only if there is no existing value for the field. I see that existing value is being updated by new value. Please let me know if I am missing anything.
I created a transform map as follow
I have the following in my onBefore transform scripts
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2021 07:59 AM
Hi Sankon,
If you are using a script to populate the values you should be able to remove all the filed mappings expect the field on which you are coalescing.
Please give it a try and provide feedback.
Hope this helps!
Tudor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2021 07:59 AM
Hi Sankon,
If you are using a script to populate the values you should be able to remove all the filed mappings expect the field on which you are coalescing.
Please give it a try and provide feedback.
Hope this helps!
Tudor

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2021 08:37 AM
like Tudor mentioned, you have those fields and the coalesce in the field mapping , that means any fields in those mapping will be updated so remove the fields from the mapping and keep the scripts.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2021 11:17 AM
1. If I have two onBefore() methods for transform map, does it execute lower order number first and if both have same order number how does it pick which onBefore() first.
2. Is it ok to combine both into one onBefore() enclosing contents of second onBefore method in else condition after if (action ='insert') .
3. what is the difference between putting snippet directly vs putting in method or runTransformScript(source, map, log, target /*undefined onStart*/ )
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2021 01:39 PM
Hi
Thanks for the input. I see that location field is showing as empty even if source has a location value, the target record is not getting updated. Does this need additional code as this a reference field?