Conditional logic not working to copy field value to another