
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2025 08:49 PM
Hi everyone,
I'm facing an issue with my field mapping assistant for a transform map. I want to skip the record if it hits the else loop in my code block. I've tried using abort, error, and ignore, but the record is still being updated with an undefined value instead of being skipped or ignored.
(function transformEntry(source) {
var tabelGR = new GlideRecord('table_name');
tabelGR .addQuery('tabel_number', source.u_tabel_number);
tabelGR .query();
if (tabelGR .next()) {
return tabelGR .tabel_number;
} else {
source.sys_import_state_comment = "Tabel number not found: " + source.u_tabel_number;
source.sys_import_state = 'error';
// Here I have used all set of action such as abort, ignore and error but in all case it is updating the record with either false or undefined which I don't want. I want that specific record to be either skipped or ignored
}
})(source);
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2025 10:16 PM - edited 05-22-2025 10:17 PM
After a lot of hit and trial got the resolution by adding the below part in else block. In this case it ignores the record for which the value didn't match.
else {
source.sys_import_state_comment = "Tabel number not found: " + source.u_tabel_number;
source.sys_import_state = 'error';
transform.setAbortAction(true);
return;
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2025 10:16 PM - edited 05-22-2025 10:17 PM
After a lot of hit and trial got the resolution by adding the below part in else block. In this case it ignores the record for which the value didn't match.
else {
source.sys_import_state_comment = "Tabel number not found: " + source.u_tabel_number;
source.sys_import_state = 'error';
transform.setAbortAction(true);
return;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2025 12:12 AM
Hello,
where exactly did you created this script? In transform map scripts? Or in field script? I am trying to achieve similar thing but it is not working for me.
Thanks