The setValue method on text component adding extra quotes around string. In the attached screen shot you can see line 20 of the model_record copy function sets the value of modal_rec_req_type to "copy". You can see the resulting text in the top left of the modal dialog with quotes around it.
It looks like text.setValue("string") is working as expected for me. Are you using the new text component? And was this working for you before?
That's super strange! I believe the setValue feature was added onto the new text component last week. Does it give any errors when it doesn't work? Does it autofill when you type