Populate subform field from On Add Row event does not work unless value is selected manually

Populate subform field from On Add Row event does not work unless value is selected manually

1. I have a form, MyMainForm that contains a subform MySubForm.
2. The lookup field, Application_Number_Text in MySubForm is a dropdown.
3. A script in the MySubForm's On Add Row event populates the Lookup field in MySubForm field:
row.Application_Number_Text = [blah blah blah]
4. When I add a subform record, the Application_Number_Text field appears to be filled.
5. When I try to save the subform row, I receive an error. This is because Zoho Creator thinks that Application_Number_Text field is empty.
6. I click the Application_Number_Text dropdown and select the value manually.
7. Now I can save the new row.