April 29, 20205 yr Good day all, I have a script that collects several reports from different tables and assembles them to email via the following code. How do I clear all the reports after the reports have been sent,(or before the next set of reports are compiled). Set Variable [ $Path; Value:Get (TemporaryPath) &"Products Active" & " " & Year ( JobCardItems::DateNextServ )& "-" & Month ( JobCardItems::DateNextServ ) & ".pdf" ] Save Records as PDF [ File Name: “$Path”; Create folders:No; Records being browsed ] [ Document - ] [ Pages - Number Pages From: 1; Include: All pages ] [ Security - Printing: High Resolution; Editing: Any except extracting pages; Enable copying; Enable Screen Reader ] [ Initial View - Show: Pages Panel and Page; Page Layout: Single Page; Magnification: 100% ] [ Restore; No dialog ] Set Variable [ $AttachmentList; Value:If ( IsEmpty ( $AttachmentList ) ; $Path ; $AttachmentList & "¶" & $Path) ] I have tried just setting the variable $Path; Value: "" but that did not work
April 29, 20205 yr Well, the idea with the temporary folder is that you don't need to clear it, because it will be deleted at the end of the session. If you are worried about disk space, you can delete a file with a known path using one of the methods listed here: https://fmforums.com/topic/93922-how-to-delete-import-file-after-processing-records-into-fm13/?do=findComment&comment=429489 These methods have become obsolete when version 18 added a new Delete File[] script step. Please update your profile to reflect your version and OS, so that we know what you can use.
Create an account or sign in to comment