Jump to content

Insert File and Save Record as PDF Question


This topic is 6515 days old. Please don't post here. Open a new topic instead.

Recommended Posts

For populating container fields with files where the file path can be calculated as the contents of a text field, I would like to set the "Specify source file" and "Specify output file" options for the associate script steps listed below. The dialog box seems to only want file paths manually entered. Is there a way to use the contents of a field to do this?

Insert File[], Specify source file

Save Records as PDF [], Specify output file

Thanks,

Paul

Link to comment
Share on other sites

No, that is not an option at that point for either of those script steps. When clicking on the "Specify source file" and "Specify output file" options the dialog window pops up and it is looking for a typed in path or the user to drill down to the file and select it..there are no other choices in the dialog.....I want to have this field populated with the text portion of a field.

Insert File[], Specify source file

Save Records as PDF [], Specify output file

Link to comment
Share on other sites

You have to use the Set Variable script step to set the file path into a named variable. You can include the FileMaker prefix; filemac:, filewin:, at that time. You can also use one of the functions, Get (DesktopPath), Get (DocumentsPath) to build a path.

You can then type the variable name directly into any import/export path dialog, as is, no quotes, no calculations.

Search here and you'll find examples. It's also explained in the FileMaker Help. It's best to create an unstored calculation field also with the full path, so you can see exactly what you're going to get (or use the Data Viewer). It's often the little things that cause errors; ie., missing the slash, filemac:Macintosh HD/, or 2 slashes, filemac:// (the functions mentioned above include a beginning and ending slash already; but not the prefix).

Link to comment
Share on other sites

THANKS AND FOLLOW UP QUESTION

"Set variable" did the trick....it is quirky though....for viewing the same documents in the webviewer in the same spot the path was different than the path needed to get the document into the container field.

to view the pdf in the web viewer:

file:/Volumes/AAC/ Scanned DOCS/ into filemaker/xxx.pdf

to insert the pdf file into the container:

filemac:/AAC/ Scanned DOCS/ into filemaker/xxx.pdf

So, the question is...if the pdf document is actually saved IN FM in a container field and not just its relative path, then...why isn't there a way to view the file in the web viewer, or open it up with a double click?

Am I missing something?:P

Thanks,

Paul

Link to comment
Share on other sites

This topic is 6515 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.