AnsweredAssumed Answered

Using a Variable Filename in Filemaker Pro 10

Question asked by shahkalukaking on Feb 12, 2010
Latest reply on Feb 13, 2010 by shahkalukaking


Using a Variable Filename in Filemaker Pro 10


Hey all, I just started using Filemaker and am trying to build a script to export my database to an Excel Spreadsheet, but I want the name of the file to be formed using the fields "First Name" and "Last Name."


My script looks like this:

 Set Variable [filename; Value:"file:../Documents/" + LDS Database Template Old Old::First Name + LDS Database Template Old Old::Last Name]

 Export Records [No dialog; "$filename"; Unicode (UTF-16)]


Now I ASSUME it should read $filename instead of "$filename" in the Export Records command, but it refuses to drop the quotation marks (it automatically inserts them no matter what I write in the filepath for Export Records). I don't know if that's why this isn't working, but it's a hunch, and if it is the problem, how do I fix it?


I just want to export "BobSaget.xls" to My Documents on a Mac when Bob is the First Name field and Saget is the Last Name field.


Right now it outputs "0.xls" if that helps anyone. That leads me to believe it's an issue with filename being assigned a value but I'm not sure. I don't use Filemaker :(


ALSO, is it possible to make one XLS and have a script which adds a line to the bottom of that spreadsheet every time the button is clicked (and ideally overwrite a line that has the same name)? Thanks for any help you can offer.