Oliver,
Rather than looping through the data pages, the best approach is probably to create a custom metadata field. On your last page with the Summary value, you can add this to your PlanetPress Talk:
definemeta('Summary', &MySummary, 0, 'Job.Group.Document')
This will create a "Summary" metadata field that will contain the value of "MySummary". (replace this by your own variable) You can then refresh the metadata, and use the field's value anywhere you need from the data selector's metadata tab.
In PlanetPress Workflow, you will have to add a "Create Metadata" action that will call the .ptk form right before the final output. This is necessary to create the required metadata file.
Hope that helps!
Regards,
Raphaël Lalonde Lefebvre