- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-20-2017 03:34 PM
Can I append a target field in a transform? I have files being imported to a table and it can affect the same field multiple times.
I was trying: "target.field = target.field + source.field" but that doesn't seem to work.
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-24-2017 06:24 PM
Hey Kkim,
I also tried to do the way you were trying to achieve and i was able to get the value in logs but was not able to append in table.
I believe it will not work in this way. In transform map source field you need to do GlideRecord, I tried to send incident short_description and it worked in this way. Please glide the record based upon you coalesce field.
Please find the sample code below:
answer = (function transformEntry(source) {
// Add your code here
var gr = new GlideRecord('incident');
gr.addQuery('incident', source.u_number); // pass the source coalesce field
gr.query();
if(gr.next())
{
var val = gr.short_description + ' ' + source.u_short_description;
return val; // return the value to be put into the target field
}
})(source);
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-16-2025 05:43 AM
For any one searching the forums, I don't believe this works anymore. I instead wrote on the table transform map script the following code
target.Targetfield += source.u_souceField
This should work and ofc can append multiple fields from your transform map