Transform Script - Updating values on second run

Priya123
Tera Contributor

hi 

have a transform script that updates a value on a True/False field on customer project table. 

 

so import set has a column has is delayed (Y/N) and based on that the Has Issue value on customer project table is updated.

 

so it goes like :

var flag;

if (source.isDelayed =='Y')

flag = true; (or flag='true';)

else 

flag = false ;

return flag;

 

have played with quotes, placing the script inside loop etc. everytime  i rerun the import, for change of the is delayed column, the table value is not updated 1st time but same File i Load , import and transform second time, the values are updated correct.. 

 

any one faced such an issue before?? 

16 REPLIES 16

Priya123
Tera Contributor

Sort of my query is this :

If my excel has String Value can they be mapped to Choice or true/false field types in SN,,, what cna be the solution to enable that mapping

The value you set, either via field map script or transformScript, must match the 'label' for one of the target fields choice list options.

if there is no match and the Choice action for the field mapping is create, then a new choice will be created.
Create a field map (servicenow.com)