- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-18-2025 09:34 AM
Hi all. We have a requirement to coalesce on a string field. The target table/field has an additional two leading characters that do not exist on the source file. Without removing the characters from the target field, how do we best approach the transform script?
EX:
Source Field: "0234"
Target Field: "000234"
Need to strip the two leading characters from target field to map on source field, while not truly removing the characters from the target field.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-22-2025 09:35 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-18-2025 11:03 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-21-2025 09:31 AM
Thank you. The conditional script is where I'm stuck.
1. Remove the first two characters from target.name
2. Coalesce on target.name using source.u_site_code
var str = target.name.toString();
var newStr = str.substring(2);
newStr = source.u_site_code;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-22-2025 09:35 AM
My question was answered in https://www.servicenow.com/community/developer-forum/comparing-two-tables-in-a-transform-script-to-c...