Update target with a null value if the source is null from transform map
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2023 02:55 PM
Update target with a null value if the source is null from transform map with out using 'Copy Empty Fields'
I have used below script but it is not working, could I get some help here please
answer = (function transformEntry(source,target) {
//var gdt = new GlideDateTime(source.u_last_day);
//return gdt.getValue();
//if (source.u_last_day == '') {
if (source.u_last_day.nil()){
target.u_last_day == '';
}
})(source);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2023 08:22 AM
@Mahesh Baraskar I tired below, it is still not copying blank values from source to target
answer = (function transformEntry(source,target) {
var gdt = new GlideDateTime(source.u_last_day);
return gdt.getValue();
if (source.u_last_day.nil()){
var null_date = new Date(0);
target.u_last_day = null_date;
//target.setValue('u_last_day', '');
}
else{
target.u_last_day = source.u_last_day;
}
})(source);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2024 02:25 PM
Did you ever get this to work? I'm have a similar situation that needs to be corrected.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2024 06:45 PM