Issue with target field's default value in dictionary
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2024 01:58 AM
I am getting source data in excel where country is blank for few records. When i transform the data using below script-
if(source.u_country)
return source.u_country;
return '';
target field is being set as USA for those records. That's because "Country" field's dictionary default value is set as USA.
I tried onAfter script by setting these target field values as '' but still the value is USA. Please let me know how to fix it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2024 03:53 AM
Hello @Developer3 ,
In both onBefore and onAfter, dictionary value would take precedence when country value is transforming as empty.
In such scenarios, you can either abort the creation of such records. To help you further, can you let me know the exact business use case?
Hope it helps.
Regards,
Shubham

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2024 04:51 AM
Hello,
Since this is set at dictionary level of the field I don't think transform scripts will help, Try creating before BR on target table and set country to blank in case it is coming from import set. If this doesn't work then try changing default USA value from dictionary to some scripts to make sure it doesn't set for import set data.
Regards,
Musab