AnsweredAssumed Answered

Inserting PDF to Container field in Looping Script

Question asked by Puffin on Dec 13, 2008
Latest reply on Dec 13, 2008 by raybaudi


Inserting PDF to Container field in Looping Script


I am a psychiatrist and have written a file used to run my office with record keeping, prescribing, billing and other functions. I have attempted to write a script which loops through patients who have outstanding balances, prints a paper statement, then saves a pdf of that statement, then imports a reference to that pdf creating a new record in a related table so the pdf can later be accessed from within FileMaker with ease. All is well until the import routine.


The save script uses two steps:


Set Variable [$$PDFName; Value: Patients::PDF File Name]

Save Records as PDF [No dialog; "$$PDFName"; Records being browsed]


and that works, but the Insert script does not see the file, necessitating my choosing it for each patient, not the desired result. The Insert script has the following steps:

Fo to Layout ["Bill PDFs" (Bill PDFs)]

Enter Browse Mode

New Record

Set Field [Bill PDFs::Patient Serial Number; Billing::Patient Serial Num]

Set Field[Bill PDFs::Creation Date; Get (CurrentTimeStamp )]

Insert File[Bill PDFs::Bill Container; "$$PDFName"]


It is the last step that would seem to be wrong.


Any help would be appreciated