You have to know the field key, you cannot get the field key by using the field name if that field does not have a value for the post, even if you use acf_get_field()
. In this case your line $field = acf_get_field( ‘assignment_approved_by’ );is returning
NULL`.
In addition to this an ACF field stores the User ID in the database for a user field and not the users display name. The user ID is the value you need to use in the update.