
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2024 12:23 PM
In researching my problem I have found a few responses that seem Solved, but they do not appear to be working for me.
During an import, if a reference field in the source is empty, I cannot seem to force the target field to become empty, if it already holds a value.
The field type is reference on both the target table and the import set table.
I cannot use "Copy empty fields," because that will zero out any fields in the target table which are not a part of my import set, and therefore would be "empty."
I have tried setting a script on that field, and I have tried an onBefore transform script. None of them seem to work for forcing the target to be none.
I've tried:
if(source.manager.nil()) target.manager = ""
if(source.manager == "") target.manager = ""
target.manager = source.manager
Frankly, all of these equate to the same thing, and shouldn't even be necessary because if the source is empty and it copied the empty to the target, it would be doing the same thing as these, so, I understand why they're not working, I just want it to work, though. 😁
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2024 12:36 PM
The reason it's not emptying out is that you have the 'Copy empty fields' = false. If you set it to true, then it will empty your reference field as expected.
I don't believe the issue you raised of zeroing out any fields in the target table that are not a part of your import set will occur -- if the fields aren't a part of the transform map, then that 'copy empty fields' checkbox won't apply to those fields -- it will only apply to the fields that you have mapped in your transform map.
Regards,
Chris Perry

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2024 12:36 PM
The reason it's not emptying out is that you have the 'Copy empty fields' = false. If you set it to true, then it will empty your reference field as expected.
I don't believe the issue you raised of zeroing out any fields in the target table that are not a part of your import set will occur -- if the fields aren't a part of the transform map, then that 'copy empty fields' checkbox won't apply to those fields -- it will only apply to the fields that you have mapped in your transform map.
Regards,
Chris Perry