Save field from dataset to another dataset

Hi, #givemeawhisky
Thank you for the code, unfortunately it does not seem to work when with reference field.
I tried to look for a solution in the forum for days, but I can’t find it.
Can you still give me some help?

In practice, if the field is created in the destination Dataset, the code works good, but if it is a referenced field it does not write the item.