I haven't tested but I would guess it has to do with your path. Get(SystemPlatform) returns a 3 for mobile devices.
The developers guide gives script step examples of save as PDF with FileMaker GO
Thank you S Chamblee. The issue was not consistent as it began working properly after I made the posting! However, I can see I needed to update my script. Hopefully this results in consistent & correct behavior. I have revised my script step to set the $FileName variable to be:
defaultID = "Document " & MSG Messages::ID;
myDocID = MSG Messages::User Personal ID;
docID = Case(IsEmpty(myDocID) = 0; myDocID; defaultID);
platform = Get(SystemPlatform)
platform = -1 or platform = 1; "filemac:" & Get(DesktopPath);
platform = -2; "filewin:" & Get(DesktopPath);
platform = 3; "file:" & Get(TemporaryPath)
docID & ".pdf"
For Save As PDF, you can actually use "file:" on all three platforms.
I'm not an FM GO user, but I thought the path for FM GO would be: "file:" & docID & ".pdf"
Oh yes, and as I recall. When you save as PDF on FM GO to a filename of a file that already exsits, the original file is not overwritten, a file with the same file name but with a number appended is used for the name of new copy of the PDF.
According to the developers guide:
By default, when you run the Save a Copy As, Save Records as PDF, or Export Field Contents script steps, FileMaker Go creates a new output file. If you continue running the script, a number is added to the end of each filename. For example, the first time you run the Save Records as PDF script step for a sample file, the output filename is sample.pdf. The second time you run the script, the filename will be sample 1.pdf.
To replace the output file with the new one instead of keeping multiple copies, add the file path (file:fileName or filemac:fileName) to the script. For example, if you type file:sample.pdf or filemac:sample.pdf in the Specify Output File dialog each time you run the script, the sample.pdf file in the Documents folder will be replaced with the new one.
The following example saves records as a PDF file named sample.pdf and will either create a new file or overwrite the existing file.
Save Records as PDF [No dialog; "sample.pdf"; Records being browsed]
The example (Taking from the developers guide) above contradict the statements right above it. I'm sure the sample needs file: or filemac: in front of it.