Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

FM.Argument

Query an argument passed to FileMaker from command line.

Component Version macOS Windows Linux Server iOS SDK
FM 5.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "FM.Argument"; index )   More

Parameters

Parameter Description Example
index The index of the argument to retrieve. From 0 to FM.ArgumentCount-1. 0

Result

Returns text or error.

Description

Query an argument passed to FileMaker from command line.
You can pass arguments to FileMaker when launching it from command line. Or on Windows pass them from a link to FileMaker on desktop or in the start menu. This way you can query argument from your scripts and react on them, e.g. decide to set more buttons visible for a debug or advanced mode.
The arguments can include on Windows file path to a database which was opened to launch FileMaker.

Examples

Query all arguments:

While(
// setup
[count = MBS( "FM.ArgumentCount" ); index = 0; list = ""];
// condition
index < count ;
// add nth argument to list
[ list = list & MBS( "FM.Argument"; index ) & ¶; index = index + 1 ];
// return result
list )

See also

Example Databases

Blog Entries

This function is free to use.

Created 1st March 2015, last changed 13th June 2021


FM.AllowFileDragDrop - FM.ArgumentCount