Import set to set a field to --None-- choice value instead of the default value in the dictionary
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2025 12:52 AM
Hi Team,
I have a choice field 'ABC' with default value set to 'XYZ'.
For a specific data source (import set), I want the choice field to set the value to --None-- instead of its default vallue 'XYZ'. What's the best way to achieve this as OnComplete transform script did not work because it runs just before the data is loaded to the target table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2025 01:01 AM
you should use onAfter transform script and update the value as None
target.field = '';
target.update();
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
07-25-2025 01:17 AM
@DaisyB057891995, Use a “Run Script” Transform Map Field Mapping for That Specific Source.
You can achieve this within the Transform Map by adding a Field Map with a "Run script" option. Here's how:
Steps:
Go to your Transform Map for the import set in question.
Create a Field Map for the ABC field.
Select "Run script" as the Mapping Type.
Use a script like this:
// Clear the field value explicitly
target.ABC = '';
This script will override the default value and set the ABC field to empty (--None-- in the UI) only when the import set runs.
Feel free to mark this response as Accepted and Helpful for future reference.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2025 04:44 PM
Thank you both, but neither of them worked.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2025 08:18 PM
Please share screenshots and more details about your transform map etc to help better.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader