On iOS the "desktop" is the launch centre.
This should be the default of
Get ( DocumentsPath )
However, with FMGo, you should not need to specify that, try:
$URL = "file:// & $pdfname
(untested and unverified...)
My post shows I tried:
Options for IOS
Set variable $URL to "file:///" & $pdfname
Set variable $URL to "file://" & $pdfname
Set variable $URL to "file:/" & $pdfname
Set variable $URL to "file:" & $pdfname
The only option seems to be to open the Launch thingy and tap on the PDF file that was saved.
What's weird is that I can easily create the pdf and email it using a script in IOS but I can't open it in IOS. In Windows I can create the pdf and open it but not mail it since I don't have Outlook set up which freezes FileMaker.
If the PDF has previously been saved into the FMGo 'documents' area, then you can use:
Set Variable $URL to "file://" & Get(DocumentsPath) & "myPDF.pdf"
Open URL [$URL]
Alternatively you can choose to open the PDF immediately after it is created by using the 'Automatically open file' option when using the 'Save Records as PDF' script step. You might want to consider saving it to 'TemporaryPath' so as not to clutter up your FMGo 'documents' area.
Or, if you have the PDF saved in a container field, you can for example, export the container to the 'TemporaryPath', and again use the 'Automatically open file' option...
In fact, you could use the 'Save Records as PDF option to save it to TemporaryPath, then insert it into a container field using 'Insert from URL' script step for later viewing using the technique suggested above.
The advantage that I can see of using 'Open file automatically' is that you get the standard 'share sheet' to then email the PDF or open in other apps etc... The Open URL option to open the PDF does not show the share options as far as I can see...
If you want to open the PDF at creation, there is a setting in the PDF Specify Output File to Automatically open the PDF. Another option to try is insert the PDF into a global container field, then export the field contents and use the automatically open file option.
1 of 1 people found this helpful
There is not a Get(DesktopPath) for ios Devices, there is a Get(DocumentsPath) or Get(TemporaryPath). See skywillmott post for the correct syntax.
Finally. The correct answer. IOS uses Get(documentspath) rather than Get(desktoppath).
Oddly, I had used this months before but forgotten it.