Hi Peter,
You need to name an object to be able to read its value in preview mode;
there's no other way (no easy one at least; it's possible to set up a
field that would modify a variable when rendered, but all this is
convoluted and unreliable). But now when you've asked I'm not sure
anymore, because whatever tests I've run I run long time ago. On the
other hand if I ended up with this idea then there were reasons, I guess
:) From what I vaguely remember if you try to read a value in preview
mode, it will return the value from the first record, regardless of the
page you're on; but an object on a layout will return the real value
from whichever record happens to be on that page.
Kind regards,
--
Mikhail Edoshin
[log in to unmask]
Skype: mikhail_edoshin
On 13.11.2014 13:19, Peter Buchanan wrote:
>
> Thanks Mikhail
>
> Similar to Richard's solution.
>
> Just one question -- the need to give an object name?
>
> Regards
>
> Peter
>
> *From:*FileMaker Pro Discussions
> [mailto:[log in to unmask]] *On Behalf Of *Mikhail Edoshin
> *Sent:* 13 November 2014 08:08
> *To:* [log in to unmask]
> *Subject:* Re: saving grouped records to individual PDF files
>
> Hi Peter,
>
> It may be possible to add a subsummary part, set it to break the page
> before each occurrence, put the region name into it and give it an
> object name. Then loop over the pages in Preview mode and on each page
> read the current region. If it's different from the previous, you got
> a new group; remember the page number and continue to loop until you
> get another region or there's no more pages. This way you can
> calculate the pages for each region and save only those pages.
>
> Kind regards,
>
> --
> Mikhail Edoshin
> [log in to unmask] <mailto:[log in to unmask]>
> Skype: mikhail_edoshin
>
>
> On 11.11.2014 21:54, Peter Buchanan wrote:
>
> Hi
>
> Maybe someone can just point me in the right direction :
>
> (Windows, FM Pro 13)
>
> I have a found set, say 30 records, all having the same job number ID.
>
> Within this set, the records each have a value in the Region field.
>
> The number of records will vary, and the regions are also variable.
>
> I sort the records by Region, then I want to save the records to PDF,
> creating one PDF file for each region.
>
> I was thinking along the lines of creating a value list of the
> regions, and then looping through each value etc.
>
> Any ideas?
>
> Many thanks
>
> Peter
>
|