Help with a field map script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2022 03:22 AM
Hello All,
I am experiencing an issue with a transformation map I created. My issue is that one of the reference fields mapped in the transformation map is not picked up properly.
I logged a ticket with ServiceNow and they confirm that the transformation map is configured properly. They suggested using a script in the field mapping to make sure the proper field is picked up.
I told them that I don't have any code experience, but they can't provide any suggestions when it comes to scripting because it means "product customization" and, as a consequence, "not supported.
This is how the field map looks like.
How do I achieve the same result with a scrip? Is the following one correct?
answer = (function transformEntry(source) {
// Add your code here
return source.u_model;
})(source);
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2022 06:15 AM
Thank you.
It is not a coalesce issue. I already tried it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2022 12:01 AM
Hi ,
Yes this should do the trick if you don't have any manipulations of data.
answer = (function transformEntry(source) {
// Add your code here
return source.u_model;
})(source);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2024 08:23 AM
Isn't model a reference field? I had almost the same case, and I used Referenced value field name (the name of the field on the referenced table) and it worked. It was a similar case, a reference to the Model table, I just wrote "name".