Jay, I also don't see why you need to do the find and show all records. (Unless I'm missing something.) Could you not shorten it to:
Show All Records Go to Record/Request/Page[ First ] Enter Browse Mode Loop Go to Layout [ Report ] Enter Preview Mode Copy [ ] [ Select entire contents ] Go to Layout [ Report Image ] Enter Browse Mode Paste [ Echo Image ] [ Select entire contents ] Go to Record/Request/Page [ Next ] End Loop Just run through them all in order. The find would surely be your slowest step. Also a Freeze Window at the beginning can sometimes greatly speed up a script. (If you had to isolate each record for some reason, consider placing the record's id in the global, but using Go to Related Record, as opposed to a find.) Geoff > -----Original Message----- > From: FileMaker Pro Discussions [mailto:FMPRO- > [email protected]] On Behalf Of Steve Cassidy > Sent: Thursday, October 18, 2012 4:18 AM > To: [email protected] > Subject: Re: Exporting Images with field data > > On 18 Oct 2012, at 03:50, Jay Erlebacher wrote: > > > I've been attempting to implement Steve Cassidy's solution, starting with > copying and pasting a preview version of each report into a container field. > It > took a bit of fiddling because I had to find each report individually, copy > and > paste it, show all records, go to the next record, find that individual > record, > and repeat. It's a kludgy process and it runs very slowly, about 20 records > per > minute. I have 18,000 records! > > The script I am using is below. Am I missing something or making it harder > than it needs to be? > > Thanks in advance... > > Hi Jay > > As I said, it might take overnight depending on how big your data set is ;) > > And I did warn you that this would be a bit kludgy! > > You could probably avoid the Find All, but I don't know if that would speed > things up much. Three seconds per record seems about right to me; I can't > imagine this process getting much quicker. (Though I use a pretty old > computer; perhaps a modern super-charged, 12-core, etc. machine might > make it faster.) > > Are your patient numbers not consecutive or close to it? If they are, you > could just increment a global at each loop (rather then setting from a field) > and use that for your find. You'd just need a check for no found records in > case there was a gap in the sequence. > > Alternatively, you could first build a global list of all the patient numbers > and > build your find requests from that list. (Another trick: put only the patient > number field on a layout; enter browse mode, go to that layout; find all > records; copy to a global field.) > > But as I say, I'm not sure this will make things much faster. I'd say you'd > best > just set this going one Friday afternoon and come back Monday morning to > find it done... > > Steve
