Robust Transform Map - RTE Entity script Operation Not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2024 02:47 AM
Dear Experts,
Can someone guide me on why the assigned to value is not being set in a Robust transform Map when used with Script operations on RTE Entity.
I am trying to set the values as per the source
if the source is empty, the assigned to and managed by should be empty
if the source has a value, the assigned to and managed by should be left as is.
I need some help urgently.
The code is attached below
(function(batch, output) {
// add your code here.
for (var i = 0; i < batch.length; i++) {
//step1: access the input variables
var a = batch[i].input; //Value of the source field.
var grPC = new GlideRecord('sys_user');
grPC.addQuery('correlation_id', a);
grPC.query();
if (grPC.next()) {
output[i] = grPC.sys_id;
}else{
output[i] = NULL;
}
}
})(batch, output);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2024 12:58 AM
@James Chun : One more query, these are all reference fields like location, assigned to managed by etc. so when I am running the RTE, it seems that it is working in some case like updating the values, but when there is no value at the source/staging table, it does update the target table, what may be the issue?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2024 01:09 AM
@Nilanjan1 , sorry not sure what you are asking here.. Are you saying if the target record's value is empty, the RTE does not update it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2024 01:51 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2025 12:23 AM
Hi Nilanjan,
Did the script worked for you?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2025 03:00 PM
@Shree14 Yes it did.