I want to create an electronic copy of my packing slip and save a copy on my server. Within the filename I want to dynamically add the packing slip ID, which is a field from the packing slip, so that I can easily find the correct slip.@
Set the desired name and path to a variable such as:
$filePath = Get ( DocumentsPath ) & "Packing Slip" & Orders::packingSlipID & ".pdf"
Then use the "Save Records as PDF" script step and in the Specify output file calculation box enter: $filePath
To add to Todd comment...
$filePath will only save it to the local machine but if you want to get it on the server,
you might need a container field in which you import the saved PDF.
This way you will have the current PDF saved within your database and can download to any local machine at anytime.
just in case
( use might need to pause script for about 2 second before importing the saved PDF to give it time to save to the local machine )
Note that, if your "server" is FileMaker Server, neither "Save Records as PDF" or "Export Field Contents" is server-side compatible. You'll need to run this from a client (either a robot machine or a copy of FileMaker Pro / Advanced running separately on the server).
If your "server" is a workgroup server, ignore this post.
Thanks Eric and Mike. I overlooked that the poster was referring to a server. If it is indeed a solution hosted on FMS, my recommendation won't work.
No, it'll still work; you just have to jump through some extra hoops.
Thanks for all the replies!
Retrieving data ...