Transform Map Row has Different Value for Active column from Loaded excel sheet

Anil_T
Tera Contributor

Whenever I am loading the excel file for Control Objective records with Active column, System is Showing different value for Active on Import Set row with "TRUE" and "true".

When system marks Import set row with Active as "TRUE" then control objective got deactivated and when system marked Import set row with Active as "true" then control objective got activated.

 

Can you please let me know whether this is the System configuration issue or the Sheet we are loading.

 

Note: When system marked Active as "true" at that time before uploading the sheet, I cleared the existing value on active column and added back true value in the sheet

6 REPLIES 6

pr8172510
Giga Guru

Hi @Anil_T,

This is a known behavior with Excel imports. Excel treats TRUE (uppercase) as a boolean value and true (lowercase) as a string, causing ServiceNow to interpret them differently.

 

Use 1 for Active and 0 for Inactive in your Excel sheet:

 
 
Excel Value Result
1Active = true 
0Active = false 

 


 Fix in Transform Map

Add this On Before script in your Transform Map:

javascript
(function runTransform(row, source, map, log) {
    
    var activeValue = source.u_active; // Change to your column name
    
    if (activeValue == 'TRUE' || activeValue == 'true' || activeValue == '1') {
        row.active = true;
    } else {
        row.active = false;
    }
    
})(row, source, map, log);

 

Value in Excel ServiceNow Reads Record Active
TRUETRUE (uppercase)false 
truetrue (lowercase)true 

Anil_T
Tera Contributor

Hi pr8172510

 

Can you please explain this, while loading the sheet into ServiceNow, in active column value first time was "TRUE" and  second time I cleared the Active column and added value as "TRUE" but ServiceNow considered different value during both the times. Also can you please explain the logic you mentioned in the table.

TRUETRUE (uppercase)false 
truetrue (lowercase)true 

 

Thanks for your quick response

Hi,

This behavior is mainly due to how Excel stores and sends the value during import.

When you enter TRUE in Excel, it is often stored as a boolean value, whereas when you clear and re-enter it (or format the column as text), it may be treated as a string value ("true").

During import, ServiceNow interprets these differently:

  • Boolean TRUE may not always map correctly depending on field type and transform logic.

  • String "true" is handled more consistently.

That’s why you observed different results even though the value looked the same in Excel.

To avoid this inconsistency

  1. Use numeric values (1 for active, 0 for inactive), or

  2. Normalize the value in a Transform Map script before mapping.

This ensures consistent behavior regardless of how Excel formats the data.

Ankur Bawiskar
Tera Patron

@Anil_T 

check this property "glide.transform.boolean.casesensitive" 

55.png

My recommendations:

-> use field map script and convert TRUE or FALSE to lower case and then set

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader