Link to home
Start Free TrialLog in
Avatar of Cruizectrl
Cruizectrl

asked on

Saving PDF/Excel Filenames

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?
Avatar of Member_2_908359
Member_2_908359
Flag of France image

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.
ASKER CERTIFIED SOLUTION
Avatar of billmercer
billmercer

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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!)
Avatar of billmercer
billmercer

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.
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...
Avatar of Cruizectrl

ASKER

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!
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.
Yes.. Thats what I was trying to work around the other day.