transform event script query
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
In above picture onstart of row transformation if action is insertion then ignore that records, query i want to run but record is getting inserted why ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
5 hours ago
HI @adityahubli ,
can you try the below script
(function transform(/*RESTAPIRequest*/ request, /*RESTAPIResponse*/ response) {
ignore = true; // This is the correct way to skip the record
status.message = 'Skipping record insert as per condition';
})(request, response);
NOTE-
This script might be in the "OnStart" or "OnBefore" section, which does not stop the insertion unless explicitly handled.
- Ensure the script is active and properly ordered.
- There might be other transform scripts (e.g., OnAfter, OnBefore) that override this logic.
- Check if there are multiple scripts attached to the transform map.If the script is inactive or has a lower priority, it might not be executed.
Other Scripts or Conditions
Thanks,
Rithika.ch
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
onStart works only once and that too before the 1st row is imported.
So it cannot ignore the row as the row has not been reached.
You should use onBefore transform script to ignore.
Map with transformation event scripts
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