Set barcode field value by custom script

Hello cummunity,
i tried to set barcode field from other field using custom script but it is not working…

have you found any solution?