- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2025 10:02 PM
Hi Community,
I have an import file which contains employee number and 2 other fields. Based on employee number, i need to update 2 other fields values.
What is the best approach to update those fields based on employee number? Do i need to use import sets or background script to do this?
What exact steps i need to follow for this?
Thanks,
Poorva Bhawsar
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2025 10:06 PM
Hello @PoorvaB ,
Create an Import Set Table:
Navigate to System Import Sets > Load Data.
Create a new Import Set Table and upload your file containing the employee number and the two other fields.
Create a Transform Map:
Navigate to System Import Sets > Administration > Transform Maps.
Create a new Transform Map and map the fields from your Import Set Table to the target table (e.g., sys_user if you're updating user records).
Ensure you map the employee number field to the corresponding field in the target table.
Define Field Mapping:
In the Transform Map, define the field mappings for the two fields you want to update based on the employee number.
Use the Coalesce field to identify the unique record. Set the employee number field as the coalesce field. This ensures that the existing records are updated rather than creating new ones.
Script for Field Update:
If you need to perform additional logic or transformations, you can use a Transform Script. For example:
(function transformRow(source, target, map, log, isUpdate) {
// Update the target fields based on the source fields
target.field1 = source.field1;
target.field2 = source.field2;
})(source, target, map, log, isUpdate);
Run the Transform:
Navigate to System Import Sets > Load Data.
Select your Import Set Table and click on Transform.
Choose the Transform Map you created and run the transform.
Verify the Data:
After the transform is complete, verify that the fields have been updated correctly in the target table.
Please Mark it as correct/helpful if this resolves your query.
Regards,
Debasis
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2025 01:08 AM
ok i will make employee number as coalesce then.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2025 01:09 AM
Try this and share feedback.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2025 04:07 AM
i have created on complete transform map script and it worked fine.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2025 01:24 AM
that's correct.
Your excel should have 3 columns Employee Number and other 2 fields
I already informed that Employee Number should be marked as Coalesce.
Where are you stuck?
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
02-26-2025 04:07 AM
No i am not stuck anywhere. Its working fine.