Is it possible to access scratchpad in transform scripts??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2019 11:02 PM
Is it possible to access scratchpad in transform scripts??
I have a requirement, where in I need to compare target table records with the input records and mark the unwanted records in target table as inactive
Please recommend.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2019 09:36 PM
Hi Asoni,
You may find below blog helpful.
https://community.servicenow.com/community?id=community_blog&sys_id=7cc66514db882380e0e80b55ca961965
- Pradeep Sharma

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2019 09:43 PM
Can you please provide some additional details on what you are trying to accomplish?
- Pradeep Sharma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2019 09:43 PM
Alternatively you can GlideRecord import set table in onComplete script and target record field in there can be used to update target table record. Otherwise there's a way to put data in session and then access that later on.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2019 09:48 PM
Hi,
scratchpad variables are used in display business rule and workflow scratchpad in workflows
for your requirement you can use onbefore transform script; query target table by using the source values and mark unwanted records as inactive
in this case you won't require any field map
Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader