ignore row but with error code 800 Unable to resolve target record, coalesce values not present
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
7 hours ago
In the excel to be imported, I want to ignore the whole row after the header row (only contains instructions).
I tried doing an onBefore script to ignore the row, but the error still appeared. Is this an expected behavior?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
so what script did you use?
You can grab the row number in onBefore transform script using source object
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
I tried the script given by @M Iftikhar but it still throws the error. This was the first script I use:
if(source.sys_import_row == 0){
ignore = true;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
I think I know why. Because in @M Iftikhar sample excel, there's still data on the coalesce field from the ignored row. I tried replicating this in the PDI and the error is not showing anymore.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
Yes, this is expected behavior.
When you use an onBefore Transform Script and try to “ignore” a row, the platform has already tried to resolve the target record using the coalesce fields. If the coalesce value is missing, ServiceNow logs error 800 (Unable to resolve target record, coalesce values not present) even if your script later decides to skip.
Ways to handle it cleanly:
Best option: Add a Transform Map Condition → e.g., source.<coalesce_field> is not empty. That way, the instruction row never even enters the transform process, so no error gets raised.
Alternative: Clean the source file → remove instruction rows before uploading.
Script-based workaround (not ideal) → In onBefore you can set ignore = true; (older versions: action.setAbort();) but even then the coalesce error may still show, depending on release.