- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2023 01:24 PM
I am imported a knowledge article id and it doesn't have KB in front of the article number. I currently have the following. What am I missing. Don't judge I am newer to scripting.
answer = (function transformEntry(source) {
var abc =source.KnowledgebaseArticle;
var op = KB+abc;
return abc; // return the value to be put into the target field
})(source);
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2023 02:36 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2023 02:05 PM
So this "KnowledgebaseArticle" is probably "u_knowledgebasearticle". You need to check this on the import table.
And your KB should be "KB" because its a string value that you want to add.
Your return value looks like it should also be op and not abc.
So something like
answer = (function transformEntry(source) {
var abc =source.u_knowledgebasearticle;
var op = "KB" + abc;
return abc; // return the value to be put into the target field
})(source);
// I would have done this.
answer = (function transformEntry(source) {
return "KB" + source.getValue("u_knowledgebasearticle");
})(source);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2023 02:36 PM
This is perfect. TY