I would suggest not using setInstances() if you need to immediately edit field values in the added subforms. It's possible, but there are easier ways. What I would do is to use a loop and the addInstance() method. And edit the values in the subform reference that is returned by addInstance(). So it would look something like this:
for (i = 0; i < 4; i++) {
var myRow = SubForm.instanceManager.addInstance(true);
myRow.textField.rawValue = "someValue";
}
Chris
Adobe Enterprise Developer Support