What do you get if you leave off the "filemac:" tag at the beginning of the file path you are calculating?
Is it possible the issue is not with the insert step, but instead with the Save as PDF step?
There's a bug in 15.02 that breaks that step when your font extensions are in uppercase. I'm not sure if it affects Mac users - we saw it on Windows.
Do you end up with a file called "temp" on your desktop?
And when you check the desk top, does a file named temp.PDF exist on the desk top?
on the desktop scripts produce "temp.pdf"
this is with Finder Preferences "Show all filename extensions" selected.
These suggestions are all "long shots" by the way as I'd expect to see an error message that the file could not be created if there were a problem with the "save as PDF..." step.
But did you first delete any prior copy of this file before running the script--just in case it had been created by an earlier version of your script and not by this most recent test of it...?
My understanding is that for exporting you need to use the "filemac" prefix, but for importing you must use "imagemac". For that reason, when I create a filepath variable I set both versions in place. I have a system which generates quotes and letters in PDF form, then stores the PDF inside the database, so use both versions in the same script.
Not quite but close.
I just ran a test with FMP 15 and windows 7.
Nothing was needed but Get(DesktopPath) & "Filename.PDF"
to save the file as a pdf.
But I needed to change that to "image:" & Get ( DesktopPath ) & Filename.PDF" in order to insert the PDF into the container field.
Note that I have avoided any "tags" such as filemac: or imagewin" that are platform specific.
Given the needed "image:" tag, I just put
into the specify PDF file dialog
image: & $filepath
works on MAC OS10.12.2 like a charm