3 Replies Latest reply on May 1, 2016 10:45 PM by bigtom

    Send Mail in FileMaker Server 14 with wild card

    tikidewey

      I am trying to send mail in FileMaker script consider the xlsx file is named with "current date and time.xlsx". So every time there will be a different fileName.

       

      I have the following:

       

      Set Variable [$filepath; Value: "filewin:" & Get(DocumentsPath) & Right(Year(Get( CurrentDate ));4) & Right("00" & Month(Get ( CurrentDate ));2) & Right("00" & Date(Get( CurrentDate ))2); & "_" & Right("00" & Hour(Get( CurrentTime ));2) & Right("00" & Minute(Get ( CurrentTime ));2) & ".xlsx"]

       

      Export Records [No Dialog; "$filepath"; Unicode (UTF-16)]

       

      Send Mail [Send via SMTP Server; no dialog; To: "Ray@gmail.com"; Subject: "Special Event"; "*.xlsx"

       

       

      Specify File is as follows:

      filewin:/C:/Program Files/FileMaker/FileMaker Server/Data/Documents/*.xlsx

       

      Consider this path location has only 1 xlsx file at all time.

       

      Question is:

      Do I have to hard code the fileName?

      or

      Is there a way to send the fileName using *.xlsx?