Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 1667 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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.

 

This topic is 1667 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.