What do you mean by "makes an export folder" ? Are you using a plugin to do that?
There are differences in runtime solutions that are indeed incompatible when compared to their operation in filemaker pro.
Without seeing your script, it's difficult to speculate what the issue is, but surely it's most likely linked to runtime incompatibility.
Yes, it may be Base Elements plugin that's the problem. It was quite a hassle finding something that worked to get a filepath to create desktop folder in which to put the exported files. Basic script below:
Set Error Capture [ On ]
Go to Layout [ “Home_Ex_U” (Home) ]
#Set device-specific desktop paths
Set Variable [ $Device; Value:Get ( Device ) ]
#Trim DesktopPath for Mac because BE_ function doesn't use it. Can't use same path for Export files. If [ $Device = 1 ]
Set Variable [ $path; Value:Substitute(Get(DesktopPath); "/Macintosh HD"; "") ] Else If [ $Device = 2 ]
Set Variable [ $path; Value:Get(DesktopPath) ] End If
#Set generic folder paths and create folders with BE
Set Variable [ $Create_export; Value:BE_CreateFolder ($path&"FC_Export files") ]
Set Variable [ $Create_import; Value:BE_CreateFolder ($path&"FC_Import files") ] #Export/import files: The export doesn't work and I've not yet thought through import If [ IsEmpty (Patient_exports::__uuID) ]
Show Custom Dialog [ Title: "No records for export"; Message: "[X] checkbox those records you wish to export."; Default Button: “OK”, Commit: “Yes”; Button 2: “Cancel”, Commit: “No” ]
If [ $Device = 1 ]
Set Variable [ $Filepath; Value:Get (DesktopPath)&"FC_export files/" ] Else If [ $Device = 2 ]
#Check below DT path works. NB: FM syntax means have to use \\ for \ if there is " or \ or ¶ is following
Set Variable [ $Filepath; Value:Get ( DesktopPath )&"FC_export files\\"&
Sum ( Patient::Export_record )<1; Patient::Lastname& "_" & Patient::Firstname& "_" &
Substitute (Patient::BirthDate ; "/" ; "_" ); "Record_batch_" )
& ".fmp12" ]
Set Variable [ $ex_patient; Value:$filepath&"Export_patient.fmp12" ]
If [ Patient::Export_record = 1 ]
Export Records [ File Name: “$ex_patient”; Character Set: “Unicode (UTF-16)”; Field Order: Patient::__uuID
// Show Custom Dialog [ Title: "Exported files"; Message: "Find on: Desktop > FC export_files"; Default Button: “OK”, Commit: “Yes” ]
Go to Object [ Object Name: "Export Records" ]
Obvious things to check:
1) Is the plugin bundled properly with the runtime?
2) Does the folder get created?
3) What are the VALUES of $Create_export and $Create_import after the set var steps are run? (Most functions return 1 with success, 0 or other text message with error).
4) Scan this list, anything stick out? Differences between the runtime application and FileMaker Pro (FileMaker Pro Advanced)
You might want to turn error capture OFF at the beginning of your script to see if any obvious errors pop up that point to a specific failure point.
Thanks, I will work through the list.
1. Properly bundled? What do I do/ check?
2. No, no folders created, so it is possible that it's in the first steps ± the Base Elements plugin that the problem lies.
1. Plug-ins: In Preferences I've allowed them to install, so I'm assuming they should work.
With that you can get a list of installed plugins to check and see if BaseElements is installed.
If I recall, you do need to include a copy of the plugin files in a folder with your runtime.
The setting is used by script step
Do you use script (and container field) to install plug-in?
Otherwise, you need to copy plug-in file manually into runtime, as Mike mentioned.
I would use Case() function to set device dependent values, instead of IF steps.
Keep in mind that kiosk mode is set by the Developer Tool but doesn't require a runtime bundle, works with Pro just fine. However kiosk is invoked in less-than-FULL privilege sets which can be set with or without Export permissions, so check the permissions settings as well.
BaseElements plugins return "0" for success.