Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 9.5   10.0   10.1   10.2   10.3   10.4   10.5   11.0   11.1   11.2    Statistic    FMM    Blog  

App.OpenFile

Asks app to open a given file.

Component Version macOS Windows Linux Server iOS SDK
App 7.4 ✅ Yes ❌ No ❌ No ❌ No ❌ No
MBS( "App.OpenFile"; path )   More

Parameters

Parameter Description Example
path The native file path to the file to open. "/Users/cs/Desktop/test.fmp12"

Result

Returns OK or error.

Description

Asks app to open a given file.
This happens asynchronously, so we have no idea if it works or not.
FileMaker may show error dialogs.
This call must be last in a script as you can’t open a file while a script is running, the file should open when the script is done. You can use FM.RunScriptLater to run a script in a few seconds to follow up. There you can check with window functions and see if there is a new window in front.

See also Files.Launch and Files.LaunchFile.

Check also the Shell functions to run command line tools and get the output. This may work on the server, where the normal launch function may not work due to missing GUI.

This function requires a native path. Use Path.FileMakerPathToNativePath to convert a FileMaker path to a native path if required. If you like to have the user choose the path, you can use FileDialog functions.

Examples

Open a database:

Set Variable [ $r ; Value: MBS("App.OpenFile"; "/Users/cs/Desktop/test.fmp12") ]

See also

Release notes

Blog Entries

Created 21st August 2017, last changed 8th August 2020


App.MemoryUsed - App.ProcessID

Feedback: Report problem or ask question.