AnsweredAssumed Answered

Send Mail in FileMaker Server 14 with wild card

Question asked by tikidewey on May 1, 2016
Latest reply on May 1, 2016 by bigtom

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: ""; 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?


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