Transform Script - Updating values on second run
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2023 07:01 AM
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??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2023 03:24 PM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2023 03:51 PM
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)