Job Switch Kit: Everything you need to crack your next ServiceNow interview Get Job Switch Kit →
Get the complete ServiceNow interview prep system — 500+ Q&A, mock interviews & more Get Job Switch Kit →

ServiceNow Transform Map Interview Questions 2026

What are the different type of script available in transform map?

There are 7 type of transform map script which gets executed at different point of time while transformation,

1. onStart: executes at the start of an import before any rows are read.

2. onAfter: executes at the end of a row transformation and after the source row has been transformed into the target row and saved.

3. onBefore: executes at the start of a row transformation and before the row is transformed into the target row.

4. onChoiceCreate: executes at the start of a choice value creation before the new choice value is created.

5. onComplete: executes at the end of an import after all rows are read and transformed.

6. onForeignInsert: executes at the start of the creation of a related, referenced record before the record is created.

7. onReject: executes during foreign record or choice creation if the foreign record or choice is rejected. The entire transformation row is not saved.

Note : In addition to above types, we do have main transform map script (which is available when we click on run script checkbox) and Field Mapping script.

What is the sequence of execution for different type of transform map script?

The correct sequence of transform map script is as follows:
1. onStart.
2. on Before.
3. Source Field script.
4. Run script, the script we can find after checking the 'Run Script' check box.
5. onAfter
6. onComplete

Below diagram represents graphical representation of execution order:

What is coalesce in transform map?

The coalesce option allows you to update existing target table records when transforming import data.

The coalesce option on a field map allows you to specify if the selected Target field should be used to coalesce on when import set records are transformed. If the field map Coalesce checkbox is selected, when the import set row is transformed the instance checks for an existing record in the target table that has the same value in the Target field as the import set row Source field. If an existing record with a matching value in the target table is found, that record is updated. If no matching record is found, then a new record is created in the target table.

Can we apply coalesce on multiple field?

Yes, we can apply coalesce on multiple fields. If we add coalesce for multiple field then all fields that are marked 'true' must match to do an update of an existing record.

How to restrict insertion of new records and allow only update of existing records?

In transform map main script, we can check for operation by using 'action' variable and set 'ignore' variable as true/false based on the value as shown in below script :

if(action=='insert'){
ignore=true;
}

What are the different variables available in transform map scripts?

1. source: Contains the import source record currently being transformed. Specify a specific field from the source record as an object property.

2. target : Contains the transformation map record currently being used for the transformation process. Specify a specific field from the transform map record with one of these properties.

3. log : Log information about the current import process. Each log level has it\'s own method.

4. ignore : When set to true, skips or aborts the current import action. In onStart scripts, this variable aborts the entire transformation process. In onBefore scripts, this variable only skips the current row being transformed.

5. error : When set to true, aborts the current import action and logs an error message in the Import Set Log.

6. error_message : When an error occurs, adds the specified error message to SOAP response.

7. status_message : Adds the specified status message to SOAP response.

What do you mean by Foreign record insert in transform map?

A foreign record insert occurs when updating a reference field on a target table. If reference field doesn't exist then transform map creates new entry in reference table. This behaviour can be managed by 'Choice Action' field on field mapping record.

These free questions are just the beginning.

The Job Switch Kit gives you 500+ battle-tested Q&A, a day-by-day prep roadmap, mock interview practice, and a complete career strategy — everything to walk in confident and walk out with an offer.

500+ Expertly Curated Interview Q&A

Battle-tested questions with structured answers — includes concept deep dives & scenario-based questions across every high-frequency topic

15-Day Study Roadmap

Day-by-day curriculum covering all 25 must-know topics in the right order

Mock Interview Bot

Full 45-min mock sessions with recording, transcript & instant feedback

Salary Negotiation Playbook

Proven strategies for counter-offers, CTC decoding & in-hand salary strategy

Job Switch Strategy

Notice period tactics, BGV prep, resignation playbook & offer comparison

Visual Progress Tracker

Per-topic dashboard, per-question confidence ratings, and topic completion progress — always know what to tackle next

Private Notes & Revision Sheet

Add private notes per question and per topic — only you see them. Star questions for your revision list and download as PDF

Get Job Switch Kit →

🔒 Secure payment via Razorpay · Instant access after payment

Real Interview Questions & Answers

Questions shared by ServiceNow professionals and reviewed for clarity, relevance, and interview usefulness.

priyanka 2026-05-20 23:00:07

i have large data set i want import data by spilt them into smaller chunks . how this is achieved explain in detail .

0 Helpfuls


Shikha 2026-05-08 01:26:15

how will i stop insertion of empty row in a transform map


priyanka 2026-05-20 23:00:44
create before tranform script and check source data is empty and action is insert then ignore= true- this will skip the current row insertion OR oob we have this check box Create new record on empty coalesce fields in transform map avoid insertions
0 Helpfuls
0 Helpfuls


Urvashi 2025-08-29 00:49:18

Maximum no of records that could be import through transform map


Madhuri 2025-09-16 02:27:26
50,000 but it is ideal to import even less records due to performance issues
0 Helpfuls
0 Helpfuls


Narendra 2024-09-30 02:42:29

What is the use of choice action in transform maps?


SEETHA LAKSHMI PRIAPPAN 2025-01-27 21:41:17
This field is available if the target field is a choice list or reference field. This field specifies what to do if the import set contains a reference or choice value other than those available. Select one of these options: create: Create a new choice or record in the reference table. ignore: Ignore the new value from the source table. reject: Skip the entire row (record) containing the new value and continue to the next row.
1 Helpfuls
1 Helpfuls


ajit kondekar 2024-04-17 05:08:53

while transforming the data from excel sheet to target table the business rule which has written on target table is that will run or not ?


Cherry 2024-07-27 01:31:45
When 'Run Business Rules' checkbox on a table transform map is set to 'true', Then BR's on target table will run on each record insert/update
1 Helpfuls
1 Helpfuls


shaik mahamamad rafi 2023-12-20 02:48:23

How we can add 51-100 record out of 100 record available in Excel file.


Abel Tuter 2025-06-06 22:14:13
Create onBefore transform script and add this (function runTransformScript(source, map, log, target /*undefined onStart*/ ) { // Add your code here if(source.sys_import_row >= 100 ){ error = true; } })(source, map, log, target);
1 Helpfuls
GVK 2026-03-25 03:40:13
you can use onBefore transform script and skip the 1st 50 rows (function runTransformScript(source, map, log, target /*undefined onStart*/ ) { // Add your code here var currentRowNumber = source.sys_import_row; if (currentRowNumber < 50) { ignore = true; log.info('Skipping this row ' currentRowNumber); } })(source, map, log, target);
0 Helpfuls
1 Helpfuls


Pratik 2023-12-11 14:08:45

How we can add 51-100 record out of 100 record available in Excel file.


Mohammed Mustafa V 2024-01-17 06:57:25
Select row header 50.
0 Helpfuls
0 Helpfuls








🚀 Power Up Your ServiceNow Career

Join a growing community of smart ServiceNow professionals to stay ahead in interviews, sharpen your development skills, and accelerate your career.

Comments




📝 My Topic Notes 🔒 Only visible to you
Log in or sign up free to save notes