Hi,
as long all the subforms are located in the same level of the forms hierachy a script like the following will do the job.
var oSubforms = Form1.resolveNodes("#subform[*]"),
cSubformNames = "";
for (var i = 0; i < oSubforms.length; i += 1) {
cSubformNames += (oSubforms.item(i).name ? oSubforms.item(i).name : "unnamed Subform") + "\n";
}
Textfield1.rawValue = cSubformNames;