Jump to content

Recommended Posts

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

Link to post
Share on other sites

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.

 

Link to post
Share on other sites

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
  • Similar Content

    • By 360Works
      Email, Scribe, and FTPeek FileMaker Plugins Have New Updated Versions with Improvements
      Learn about the new updates available and download now!
      Last week we were excited to announce that all of our plugins are compatible with the new FileMaker 19 platform!

      This week, we have additional feature enhancements and improvements specific to three of our most popular plugins: 360Works Email, Scribe, and FTPeek.

      While these are minor updates, we encourage you to update now for the best experience using each plugin.
      Download new plugin versions and check out the latest improvements using the links below!
      360Works Email Plugin (Version: 3.316) - FileMaker plugin for sending and receiving emails using IMAP, SMTP, or POP, plus adds sending SMS/Text Messages from FileMaker capabilities.
      Added "attachmentsDir" parameter to EmailReadMessages, allowing users to specify a local directory where they want attachments downloaded. Downloaded attachments are now deleted when EmailDisconnect is called. Implemented a fix for some rare DHC issues that were occurring. Improved inline attachments in emails for better downloading. Reworked the "secureconnection" parameter. SecureConnection will now set both ssl and tls to true. However these can be set individually with "ssl=true" or "tls=true". This resolves issues with certain mail servers that require tls, but reject ssl. IMAP servers better retrieve the messageId and better loading of body structure in messages. 360Works Scribe Plugin - (Version: 4.0710) - FileMaker PDF plugin, OCR plugin, Microsoft Word and Excel integration - all in one.
      Improved how keywords are being pulled from PDFs. Improved Windows file-locking, temporary files are now deleted when ScribeDocCancel is called. Better conversion of Excel files to text with merged cells. Improved Textract results downloads for better accuracy. Improved inserting images into Excel documents. 360Works FTPeek Plugin - (Version 2.305) - FileMaker plugin that can upload, download, and manipulate remote files on an FTP (File Transfer Protocol) server.
      Updated FTP libraries, resolving some connection issues. Reworked the Forcetrust parameter on FTPeek_ConnectFTPS. It should now accept most invalid certificates.
       
      Interested in Three or ALL Plugins from 360Works?
      Get the BEST DEAL with the Portfolio Bundle.
          Stay updated with 360Works
    • By mvoogt
      I have started sending emails using the INSERT FROM URL method shown by soliant here:
      https://www.soliantconsulting.com/blog/html-email-filemaker/
      Emails are being sent out but many recipients seem to be getting my emails sent to their spam folders. I'm curious if this has anything to do with this method of sending emails.
    • By DataCruncher
      HELP!
      This is driving me nuts. 
      Need to send emails with an attachment from server side script. 
      The attachment path calculates correctly, as far as I can tell. Permissions are 777 (I Know...), but the file still does not attach!
       
      This is the variable calculation that yields the path: 
      "/Samsung SSD/Library/FileMaker Server/Data/Documents/"&$filename
       
      Only problem is: attachments don't attach!
      I have tried every iteration I could think of: 
      "filemac:/Samsung SSD/Library/FileMaker Server/Data/Documents/"&$filename
      "/$filename"
      "<Documents>/"&$filename
      What am I missing here???
       
      Thank you!! I can't believe I'm the only one who ran into this issue?
    • By 360Works
      360Works Portfolio Bundle: Build a complete solution in FileMaker at a fraction of the cost.
           
      Save Money
      The 360Works Portfolio Bundle offers the best FileMaker plug-in deal around. You receive all of the 360Works plug-ins and tools for FileMaker at 75% off the cost of the entire product suite from 360Works, saving you a great deal of money in the long run.    
       
      Save Time
      Additionally, it saves you time by providing one, single license key to register all plug-ins and add-ons in your FileMaker solution. You even save time with updates! The Portfolio Bundle is on our Maintenance model for licensing, this means that your purchase includes 12 months of maintenance, which gives you all new products and upgrades released up to a year after your Portfolio Bundle purchase. At the end of 12 months, you may choose to renew your maintenance subscription for each additional year, for a cost of $695 (or auto-renew at $625.50).
       
       
      The Portfolio Bundle includes over 18 FileMaker products, some of which are exclusive to Portfolio Bundle license holders only. Here is a friendly reminder about all that it has to offer:
       
                   
      Download products and learn more today at 360works.com/portfolio.
       
           
      360Works Support
      Our 360Works Support Team is dedicated to your successful use of 360Works plug-ins and add-ons. If you run into issues we offer 2 free hours of technical support Monday - Friday from 10:00 a.m. - 6:00 p.m. (ET). Most questions can be answered at our documentation/help page and requests for support team assistance can be sent to support@360works.com
         
           
      Stay updated with 360Works
                       
       
       
           
    • By Jim Gill
      This is probably one of those questions which separates me from people that make money as developers and those that don't (that would be me).  I have a simple script that compares two variables. The variables are populated with  text (Peoples Names).  Basically, if the the two variables are TRUE (the variables are equal) I want to stop the script.  Despite the two variables being equal - the IF continues.  I have noted when I use the same numbers to populate the variables - the script works as expected.  Please tell me Filemaker is smart enough to evaluate text in variables.   Below is the my script and attached is a screenshot of my debugging efforts.   
      As always - thank you to the people here which share your wisdom - a big reason I love Filemaker so much.  
      Jim
      IWP: IWP: Bunk Choice Select
      #This script allows WebD users to select bunkmates for the coming summer.
      #List All Chosen Names
      Set Variable [ $BR_List; Value:List ( BRE__BUNKSREQUEST_tog::Bunk Request Choice 1;BRE__BUNKSREQUEST_tog::Bunk Request
      Choice 2;BRE__BUNKSREQUEST_tog::Bunk Request Choice 3;BRE__BUNKSREQUEST_tog::Bunk Request Choice 4 ) ]
      Set Variable [ $BunkRequest; Value:Agegroup_Names_List::Name_Full ]
      Set Variable [ $BR_Check; Value:FilterValues ( $BR_List ; $BunkRequest ) ]
      #IF check to see if the names has already been selected
      If [ $BunkRequest = $BR_Check ]
      Show Custom Dialog [ Title: "No Duplicates"; Message: "You have already chosen this person. Please give us FOUR differnt names!
      Thanks!"; Default Button: “OK”, Commit: “Yes” ]
      Exit Script [ ]
      End If
       

      If [ BRE__BUNKSREQUEST_tog::Bunk Request Choice 1 = "" ]
      Set Field [ BRE__BUNKSREQUEST_tog::Bunk Request Choice 1; $BunkRequest ]
      Else If [ BRE__BUNKSREQUEST_tog::Bunk Request Choice 2 = "" ]
      Set Field [ BRE__BUNKSREQUEST_tog::Bunk Request Choice 2; $BunkRequest ]
      Else If [ BRE__BUNKSREQUEST_tog::Bunk Request Choice 3 = "" ]
      Set Field [ BRE__BUNKSREQUEST_tog::Bunk Request Choice 3; $BunkRequest ]
      Else If [ BRE__BUNKSREQUEST_tog::Bunk Request Choice 4 = "" ]
      Set Field [ BRE__BUNKSREQUEST_tog::Bunk Request Choice 4; $BunkRequest ]
      End If
      Commit Records/Requests
      [ Skip data entry validation; No dialog ]
       

  • Who Viewed the Topic


×
×
  • Create New...

Important Information

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