- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2024 11:39 PM
Can anyone suggest how can we use Robust Transform Engine operations in servicenow?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2024 05:15 AM
First of all there are so many operations in RTE Entity Operations and I use hardly two type of operations like script and concatenation.
So like most of our work we can cover with scripting and they provide us the basic template that we can use like
(function(batch, output) {
for (var i = 0; i < batch.length; i++) {
//step1: access the input variables
var a = batch[i].input; //Value of the source field.
//step2: Your script/code goes here.
var b = a + 1;
//step3: set the output for each elements
output[i] = b;
}
})(batch, output);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2024 04:14 AM
Hi @Prithvi Ramesh1 ,
Refer the below docs URL which may help you.
Please appreciate the efforts of community contributors by marking appropriate response as Mark my Answer Helpful or Accept Solution this may help other community users to follow correct solution in future.
Thanks
AJ
Linkedin Profile:- https://www.linkedin.com/in/ajay-kumar-66a91385/
ServiceNow Community Rising Star 2024
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2024 05:15 AM
First of all there are so many operations in RTE Entity Operations and I use hardly two type of operations like script and concatenation.
So like most of our work we can cover with scripting and they provide us the basic template that we can use like
(function(batch, output) {
for (var i = 0; i < batch.length; i++) {
//step1: access the input variables
var a = batch[i].input; //Value of the source field.
//step2: Your script/code goes here.
var b = a + 1;
//step3: set the output for each elements
output[i] = b;
}
})(batch, output);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2024 11:53 AM - edited 06-12-2024 11:55 AM
@Community Alums
Quick question. In your "Scripted Operation", have you found that it adds a leading space to the Output?
I have a script, where I take an employee ID from my staging table, query the User table for a match, and return the sys_id of the user. I then use this to populate the User's Manager when i update or add them.
Suggestions? my output is placing a space before the sys_id, so the reference user field doesn't populate correctly.
I've added the Output[i] to a gs.info log to verify what the script is returning.