Import Set Executions ignoring mapping to E164 Phone Field

Brizky
Giga Expert

Was wondering if anyone could tell me if there's something special required to handle E164 fields in your Transform map.  I have a flat file with a phone number field in the format of (###) ###-####.  It points to the sys_user table's Business Phone (phone) field.

 

Every time the import runs, the logs indicate that the record was skipped because there was no change to the fields despite how many times I change the phone number in the source file.

 

This type of field SEEMS to be a combination of some territory information as well as the phone number.  But I can't figure out how to specify the territory in the mapping or why the phone number changes aren't considered as actual changes.

 

tempsnip.png

1 REPLY 1

Peter Bodelier
Giga Sage

Hi @Brizky,

 

Try this as Source Script:

 

return formatPhone(source.u_office_phone);

function formatPhone(str) {  
var area_code = str.slice(1,4);  
var first_three = str.slice(6,9);  
var last_four = str.slice(10,14);
var ph = "(" + area_code + ")" + first_three + "-" + last_four;  
return ph;  
}  

 


Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.