?
Solved

Saving PDF/Excel Filenames

Posted on 2006-06-02
8
Medium Priority
?
328 Views
Last Modified: 2010-04-27
I have a database that keeps track of all documents that are circulating and the revision history.  Each time there is a revision on a document it records it in this database but then needs to be exported for other users to view.

The problems I'm running into is that there are 100+ documents, and each user has shared folders and shortcuts that point to the documents as well as the documents that hold the revision history (the records I'm exporting).  So depending on the record that the revision history is being being updated, I would need to update that PDF file.

Is there a way to use variables in the SAVE PDF script step?
0
Comment
Question by:Cruizectrl
  • 4
  • 2
  • 2
8 Comments
 
LVL 28

Expert Comment

by:lesouef
ID: 16820688
no, still the same ridiculous limit! you need to save it under a constant name then rename or move it by calling a external script, cmd shell script for windows or applescript /bash script for osX.
0
 
LVL 19

Accepted Solution

by:
billmercer earned 1000 total points
ID: 16822059
Actually, this isn't true with FileMaker 8 anymore. Now you can do this, by using script variables.

Store the filename in a script variable, then add the "Save Records as PDF" script step, and in the File Reference, instead of specifying a filename, just type in the name of the script variable. FM will recognize the script variable, and use its value as your file reference.

Here's a simple example:
http://www.milleniumhandandshrimp.com/upload/create%20a%20PDF.fp7

This is a HUGE advantage for FM8 over previous versions, and yet they're  feature that appears to be almost undocumented, which is weird considering what a huge advantage it is over previous versions.

0
 
LVL 28

Expert Comment

by:lesouef
ID: 16822319
gosh! i'll test that right now...
I apologize, it is documented perfectly, except it is not where I expected it (ok, I never read the book, but who did it?).
It's a bit amazing because there is no sign in the user interface that you can enter something else than a fileref, which is a kind of religion in fm, the GUI tells you everything, si you don't even search anything else as you would do in another app.
Sorry for that, thanks again Bill, it is a great feature, it allows to work out file names from fieds content, a great step forward (for fm only, others wre doing it for a long time!)
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 19

Expert Comment

by:billmercer
ID: 16823568
Yeah, this is a huge improvement, it eliminates an enormous stumbling block for FM developers. Basically anywhere you would enter a file reference, you can enter a script variable instead. In my opinion this is one of the biggest improvements in v8. What's interesting is, nobody seems to know about it.
0
 
LVL 28

Expert Comment

by:lesouef
ID: 16824201
true, so did I. As everybody, I expected it, but after I read what's new in v8, I said, sh.. nothing yet. and I was among the very 1st to get it, my order was done before it got available here.
for v8, I would say variables, script arguments and tabs are the major changes. tabs are still missing a command to switch them , we still have to cheat with fields to switch to the one we want, same for portals where you do not control which one is active if you have 2 in the same layout.
Mind you, I have an app, the last one I did btw, which did not work properly since moved from stand alone to a fm server when generating a pdf file.
I just realized that today, and I could work around the pb by using a variable to make related to the user's machine.
btw, that's another flaw, if you save a file as file:file.pdf, if the file is hosted, it saves it in the fm folder.
if you send an email using the send mail command, with this file as attachement, you would have expected yr mailer to find it; no, it does not; obvisouly, fm does not convert the path in a real path before passing it to the mailer, so the email leaves with no attachement...
0
 
LVL 1

Author Comment

by:Cruizectrl
ID: 16824918
Because the file name would have to referance a variable and nothing else.  You cant have the script point to a filename such as $file & referance.pdf
The variable has to be the fille filename or else it wont work.  Very cool!
0
 
LVL 28

Expert Comment

by:lesouef
ID: 16826327
I agree, but that was not my point: you can fix that by making the $fileref = $file @ "refrerence.pdf".
the send mail pb is:
when fm has a relative path for a file, it passes it 'as is' to an external app, for which the relative path is not true, so it should convert it to an absolute path in theory, since send mail is certainly using an external app, but is an internal command, so you expect the relative path to work for it. Note that I am not talking of the savepdf with "send file as attachement", but the stand alone send mail command.
0
 
LVL 1

Author Comment

by:Cruizectrl
ID: 16833049
Yes.. Thats what I was trying to work around the other day.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Pop up windows can be a useful feature of any Filemaker database.  Though best used sparingly, they can be employed in a multitude of different ways, for example;  as a splash screen at login, during scripted processes to control user input, as pick…
Problem: You have a hosted FileMaker database and users are tired of having to use Open Remote or Open Recent to access the database. They say, "can't you just give us something to double-click on rather than have to go through those dialogs?" An…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses
Course of the Month14 days, 5 hours left to enroll

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question