- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2020 10:55 PM
Is this a function that calls itself simultaneously?
I am concerned here with the syntax
We name the function and execute it directly without
transformEntry(); to need?
An using der Object Source?
answer = (function transformEntry(source) {
})(source);
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2020 11:37 PM
that is the Self-executing function
A self-executing function is both declared and invoked within the same script field. Whenever writing a script that only needs to run in a single context, such as a transform map script, use this type of function. For functions that must run in multiple contexts, consider reusable functions instead.
answer is the OOB variable which is available and holds the value to be stored in the target field when used in field map script
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2020 11:42 PM
Ankur my mentor 🙂
Thank you!
Why do I have to do SOURCE
})(source);
write,
would have the
})();
not enough?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2020 11:47 PM
Hi,
that is the source object which is available OOB which helps accessing the import set table fields
that function accepts source object so that you can use it
refer links for help below
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2020 11:04 PM
Yes thank you,
The Question is, why i have to use it in at the end of the funtion too?
Why does })(); is not enough?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2020 11:21 PM
Hi,
it's part of the syntax
refer link
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2020 11:44 PM
Its a source field script in the transform maps. Which will execute on the source fields before transforming to target table.