Transform Script to update Location field in Transform Map
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2022 11:32 PM
Hi ,
I need to update the Target field based on the input from Source in Transform Map .
Below is the Source Fields and Traget field
Need to hard code through script for the following
For Example : if (San Newyork) update in target as Newyork
Please help on this writing transform script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2022 10:55 AM
Hi Linda ,
If i want to give the else if how to apply here
if (source.u_source_data_center.indexOf("San Newyork") > -1) {
return "Newyork";
}
else if (source.u_source_data_center.indexOf("Oracle Melbourne") > -1)
{
return "Melbourne";
}
But this else if condition not working . if part is working , second else if is not working.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2022 01:02 PM
How many different 'if's' do you have? I may suggest to opt into a lookup table but if there is only a couple then you can do another if instead of else if....