Yes it should still work. You are copying the value of the reference variable to the reference field. If they both point to the same table [sys_user_group] then it will work.