FM.ArgumentCount
----------------

Queries number of arguments.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [FM](component_FM.md) | [5.1](newinversion51.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "FM.ArgumentCount" ) ### Parameters

none

### Result

Returns number or error.

### Description

Queries number of arguments.  
Those arguments are passed when FileMaker is launched from command line, a batch file or a link on windows.  
### Examples

Query all arguments:

 While(  
// setup   
\[count = MBS ( "FM.ArgumentCount" ); index = 0; list = ""\];   
// condition  
index &lt; count ;   
// add nth argument to list  
\[ list = list &amp; MBS ( "[FM.Argument](FMArgument.md)"; index ) &amp; ¶; index = index + 1 \];  
// return result  
list )  
### See also

- [FM.Argument](FMArgument.md)

### Example Databases

- [Utility functions/Command Line Arguments](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Utility%20functions/Command%20Line%20Arguments.shtml#1ScriptAnchor_)

### Blog Entries

- [MBS FileMaker Plugin, version 5.1pr1](https://www.mbsplugins.de/archive/2015-03-16/MBS_FileMaker_Plugin_version_5/monkeybreadsoftware_blog_filemaker)

This function is free to use.

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

  
[FM.Argument](FMArgument.md) - [FM.Beep](FMBeep.md)

[HTML Version](FMArgumentCount.shtml)