The create datastore record with data action fails

I created a simple 2 layout stack. Layout 1 (Main) has a button to go to Layout 2 (hrNewCode) - a placeholder for a dialog style data entry form. On layout hrNewCode there are 3 labels, 2 fields, and a pulldown menu, a cancel button and a submit button. The click ACTION of the submit is to create a new datastore record with data. The data coems from the 3 widgets (2 fields, 1 pulldown menu). I get an error and the script that has been generated from the ACTION has no names for any of the widgets EVEN THOUGH there are named and I selected them by name using the value from widget option. (see script below). Obviously I can add the names in the script, but this error shoudl not have occurred.

/* This code was generated from the hrNewCodeStore workflow. */
on mouseUp pButton
datastoreCreateNewRecordInCollectionWithData
“codes”,
{
“description”: the text of widget “”,
“name”: the text of widget “”,
“parent”: the text of widget “”,
“type”: “CODE”
},
true
go to stack “Layout 1”
end mouseUp