Subform details in a email

Subform details in a email

I have read the following:


and tried putting this into my form:

message="";
for each item in Progress
{
message=message + item.Progress + "<br />";
}


But this is getting ALL the items in progress, but I just want the ones that have been added as subforms to just the current form. How do I do this? Is there a way to identify in the subform what mainform ID is associated with it?