You could use the OnObjectExit or OnObjectSave trigger to perform a script for this, but if the only thing you need to do is enter data into another field, you don't need to.
Open Manage | Database | Fields and find the CompletedBy field. Double click it to open Field Options.
Select the auto-enter tab. Enter a calculation such as:
If ( Status = "Complete" ; AssignedUser ; self )
Depending on how this field is used, you can clear the " do not replace existing value" check box if you want this expression to overwrite existing data in the field.
You can also define CompletedBy as a calcualtion field with this expression: If ( Status = "Complete" ; AssignedUser )
Or you can place the AssignedUser Field on your layout where you were going to put the CompletedBy field and use conditional formatting to hide the text in the field unless YourTable::Status = "Complete".
Thanks for your help.