sandyinlet Posted December 19, 2008 Posted December 19, 2008 I'm preparing a scripted routine for generating PDFs and I'd like to offer users a field to identify the file name plus a button to identify the location for storing the file — anywhere on their drive. Is there an available routine within FMP9 that will open up a "choose location" dialogue where they can navigate to their preferred folder for saving the PDF? Or is this something requiring a plug-in? Assistance appreciated.
Søren Dyhr Posted December 21, 2008 Posted December 21, 2008 Not that this might the best of solutions, but it works kind of... you simply writes the .pdf to the temp area, and then return it into the solution again in a global containerfield. Exporting the content of a fields value will then prompt the user for directions as to where to put the file. But instead of using applescript for the matter is it x-platform! --sd
sandyinlet Posted December 21, 2008 Author Posted December 21, 2008 Søren, may I ask one more thing? The routine I'm working on outputs letters with embedded fields. Thus the first letter is "Dear John," the next is "Dear Bill," etc. And the routine I'm using is a clone of the one for outputting these letters to paper. Except I'm finding each of the PDFs, as they are generated, are overwriting the previous one. I had expected I'd get a string of files with names like, "Letter.pdf," "Letter1.pdf," "Letter2.pdf." Is this normal, or is there something else I'm not understanding in scripted PDF setup. Assistance much appreciated.
Søren Dyhr Posted December 21, 2008 Posted December 21, 2008 It's not exactly clear what you mean by this, but if you take a look at: http://www.filemaker.com/help/Script-Steps54.html ...would you in a similar manner be able to keep track of previous exports, say in a related table to prevent overwriting existing, by again to set a variable to the second part of the statement. --sd
sandyinlet Posted December 23, 2008 Author Posted December 23, 2008 Not that this might the best of solutions, but it works kind of... you simply writes the .pdf to the temp area, and then return it into the solution again in a global containerfield. Exporting the content of a fields value will then prompt the user for directions as to where to put the file. But instead of using applescript for the matter is it x-platform! --sd Søren, This technique, insert file and export field contents, almost works. Two supplementary questions: 1. Is there a way to capture the filename the user actually chooses? For purposes down the line I'd like to store it in a global field. I'm following your code exactly, with the result the change of file name is known to FMP but isn't captured in a field or variable for further handling. 2. Is there a way to capture whether the user clicked either of the two options: "Automatically open file," or "Create email with file as attachment." With appreciation.
Fenton Posted December 24, 2008 Posted December 24, 2008 I don't think there is a way to capture the name that the user is giving to an exported file, if that's what you're asking. Nor do I think FileMaker can tell you whether they clicked one of those options. FileMaker is kind of done with the file at that point, at least as far as telling you about it. I would be thinking of use either AppleScript or a plug-in to set up the file path and returning it to FileMaker. Because you could fairly easily do this with either. Yes, it's more trouble. But AppleScript is both free and built-in to Macs, and there is a free MooPlug plug-in for Windows.
Recommended Posts
This topic is 5814 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 accountSign in
Already have an account? Sign in here.
Sign In Now