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.3
9.4
9.5
10.0
10.1
10.2
10.3
10.4
10.5
10.6
Statistic
FMM
Blog
Component: FM
Functions for FileMaker core functions like running scripts.
| Item | Details |
|---|---|
| FM.AllowFileDragDrop Installs fix for file drag and drop problem. | Mac only 7.0 |
| FM.Argument Query an argument passed to FileMaker from command line. | All 5.1 |
| FM.ArgumentCount Queries number of arguments. | All 5.1 |
| FM.Beep Beeps. | Mac/Win 8.2 |
| FM.ChooseDictionary Chooses or queries dictionary used. | Mac only 9.4 |
| FM.CompareTables Compare two tables. | All 9.3 |
| FM.CurrentLayoutID Queries ID of current running FileMaker layout. | All 10.2 |
| FM.CurrentLayoutName Queries name of current layout. | All 10.2 |
| FM.CurrentScriptID Queries ID of current running FileMaker script. | All 5.1 |
| FM.CurrentScriptName Queries name of current script. | All 5.1 |
| FM.CurrentThreadID Queries current thread ID. | All 5.1 |
| FM.DataType Returns data type of argument. | All 6.1 |
| FM.DataViewerContent Looks for data viewer and copies visible table content. | Mac only 6.3 |
| FM.DeleteRecord Deletes an existing record in a table in one line. | All 6.0 |
| FM.DeleteRecords Deletes existing records in a table in one line. | All 6.0 |
| FM.DisableMouseWheel Disables use of mouse wheel on Windows. | Win only 5.1 |
| FM.DisableRuntimeEndWindow Disables end screen on runtime on Mac. | Mac only 4.3 |
| FM.EnableMouseWheel Enables use of mouse wheel on Windows. | Win only 5.1 |
| FM.Evaluate Similar to FileMaker's built in FM Evaluate | All 1.3 |
| FM.ExecuteFileSQL Execute the SQL Statement against a FileMaker database. | All 3.5 |
| FM.ExecuteFileSQLOnIdle This is similar to FM.ExecuteFileSQL, except that it waits until idle to execute. | All 6.5 |
| FM.ExecuteSQL Execute the SQL Statement against the current FileMaker File. | All 1.2 |
| FM.ExecuteSQL.LastError Queries the last error code from an SQL call | All 1.2 |
| FM.ExecuteSQL.LastErrorMessage Queries the last error message from an SQL call | All 3.0 |
| FM.ExecuteSQL.LastSQL Queries last SQL command. | All 7.4 |
| FM.ExecuteSQLOnIdle This is similar to FM.ExecuteSQL, except that it waits until idle to execute. | Mac/Win 1.2 |
| FM.GetDictionary Queries current dictionary. | Mac only 9.4 |
| FM.GetDictionaryList Queries current dictionaries list. | Mac only 9.4 |
| FM.GetDisableContextualMenus Queries whether to disable contextual menus. | Mac/Win 10.1 |
| FM.GetSQLBatchMode Queries turbo level for sending SQL in chunks. | All 6.4 |
| FM.InitMessageFilter Initializes COM message filter. | Win only 8.3 |
| FM.InsertOrUpdateRecord Inserts or updates a record in a table in one line. | All 6.0 |
| FM.InsertOrUpdateRecord2 Inserts or updates a record in a table in one line. | All 6.1 |
| FM.InsertOrUpdateRecord3 Inserts or updates a record in a table in one line. | All 6.1 |
| FM.InsertOrUpdateRecordQuery Insert or updates a lot of records queried from a database. | All 8.4 |
| FM.InsertRecord Inserts a new record in a table in one line. | All 5.1 |
| FM.InsertRecordCSV Inserts records based on CSV text. | All 7.4 |
| FM.InsertRecordQuery Inserts a lot of records queried from a database. | All 5.1 |
| FM.InsertRecordQueryIgnoreDuplicates Inserts a lot of records queried from a database. | All 6.0 |
| FM.InsertRecordTSV Inserts records based on tab/return separated text. | All 5.3 |
| FM.InsertSetUpdateProgressDialog Enable updating progress bar. | Mac/Win 6.2 |
| FM.IsMainThread Checks if current thread is main thread. | All 5.1 |
| FM.LayoutIDForLayoutName Queries the ID for layout with given name. | All 10.2 |
| FM.LayoutNameForLayoutID Queries layout name for a layout ID. | All 10.2 |
| FM.LayoutNames Queries list of layout names in current file. | All 10.2 |
| FM.Loop Universal function to run a loop with evaluate. | All 8.2 |
| FM.MainThreadID Queries main thread ID. | All 5.1 |
| FM.MouseWheelScriptTrigger Installs a script trigger for mouse wheel. | Mac/Win 6.3 |
| FM.NULL Returns a null value. | All 5.1 |
| FM.PatchNotificationProblem Patched problem with Scroll Notifications. | Mac only 8.1 |
| FM.QueryBaseTableNames Queries the base table names of all tables currently open. | All 3.1 |
| FM.QueryFieldsForBaseTableName Queries the field names of all fields in the given table. | All 3.1 |
| FM.QueryFieldsForTableName Queries the field names of all fields in the given table. | All 3.1 |
| FM.QueryTableNames Queries the table names of all tables currently open. | All 3.1 |
| FM.RunDatabaseDesignReport Performs a data design report automatically. | Mac/Win 5.0 |
| FM.RunSaveAsXML Saves database as XML. | Mac/Win 9.2 |
| FM.RunScript Runs a script in any open FileMaker file. | All 1.2 |
| FM.RunScriptIdle Runs a script after idle period. | Mac/Win/Linux 3.3 |
| FM.RunScriptLater Runs a script in any open FileMaker file. | All 1.2 |
| FM.SQL.Avg Calculates average value in a record set. | All 9.1 |
| FM.SQL.CSV Queries text of SQL result for CSV export. | All 7.0 |
| FM.SQL.Execute Execute the SQL Statement against a FileMaker database. | All 5.1 |
| FM.SQL.Field Queries field value for given position in result. | All 5.1 |
| FM.SQL.FieldCount Queries number of fields. | All 5.1 |
| FM.SQL.FieldType Queries field type for given position in result. | All 5.1 |
| FM.SQL.InsertRecords Inserts records in FileMaker database from records in memory. | All 6.4 |
| FM.SQL.InsertRecordsToSQL Inserts records in SQL database from records in memory. | All 6.4 |
| FM.SQL.JSONColumn Returns a column as JSON array. | All 10.5 |
| FM.SQL.JSONRecord Returns a row as JSON object. | All 8.1 |
| FM.SQL.JSONRecords Returns rows as JSON array. | All 8.1 |
| FM.SQL.Max Queries max value in a record set. | All 9.1 |
| FM.SQL.Min Queries min value in a record set. | All 9.1 |
| FM.SQL.Release Releases memory used for the SQL result. | All 5.1 |
| FM.SQL.ReleaseAll Release all FMSQL objects. | All 10.5 |
| FM.SQL.RowCount Queries number of rows in the result. | All 5.1 |
| FM.SQL.Sum Calculates sum value in a record set. | All 9.1 |
| FM.SQL.Text Queries text of SQL result. | All 7.0 |
| FM.SQL.XMLRecord Returns a row as XML object. | All 10.3 |
| FM.SQL.XMLRecords Returns rows as XML. | All 10.3 |
| FM.ScriptIDForScriptName Queries the ID for script with given name. | All 5.1 |
| FM.ScriptNameForScriptID Queries script name for a script ID. | All 5.1 |
| FM.ScriptNames Queries list of script names in current file. | All 5.1 |
| FM.SetDisableContextualMenus Whether to disable contextual menus. | Mac/Win 10.1 |
| FM.SetSQLBatchMode Sets turbo level for sending SQL in chunks. | All 6.4 |
| FM.SetThreadName Sets a new name for a thread. | All 6.0 |
| FM.StopScriptIdle Stops any idle timer. | Mac/Win/Linux 5.0 |
| FM.TableStatistics Queries statistics on a table. | All 8.2 |
| FM.UpdateRecord Update an existing record in a table in one line. | All 6.0 |
| FM.UpdateRecord2 Updates existing records in a table in one line. | All 8.0 |
| FM.UpdateRecord3 Updates existing records in a table in one line. | All 8.0 |
| FM.UpdateRecords Updates existing records in a table in one line. | All 6.0 |
| FM.UpdateRecords2 Updates existing records in a table in one line. | All 8.0 |
| FM.UpdateRecords3 Updates existing records in a table in one line. | All 8.0 |
| FM.VariableAdd Adds a value to a given variable atomically. | All 8.3 |
| FM.VariableAppend Appends text to a variable. | All 9.5 |
| FM.VariableClear Destroys a variable that was declared with FM.VariableSet. | All 1.2 |
| FM.VariableClearAll Clears all variables. | All 5.2 |
| FM.VariableExists Checks if a variable with that name exists. | All 4.0 |
| FM.VariableGet Retrieves the value of named variable that was declared using FM.VariableSet. | All 1.2 |
| FM.VariableList Returns list of all variables names and values. | All 4.0 |
| FM.VariableNames Queries list of all variable names. | All 8.0 |
| FM.VariableReset Resets the list of variables. | All 4.0 |
| FM.VariableSet Stores a named variable that can be retrieved later using FM.VariableGet. | All 1.2 |
103 functions.
Release notes
- Version 10.5
- Added AVExport.ReleaseAll, AVRecorder.ReleaseAll, CoreML.ReleaseAll, DNSLookup.ReleaseAll, Dictionary.ReleaseAll, FM.SQL.ReleaseAll, JS.ReleaseAll, JavaScript.ReleaseAll, LDAP.ReleaseAll, PDFKit.ReleaseAll, PKCS12.ReleaseAll, PKCS7.ReleaseAll, PKey.ReleaseAll, SSH.ReleaseAll, WinSendMail.ReleaseAll, WindowsML.ReleaseAll, WordFile.ReleaseAll, and X509.ReleaseAll.
- Added FM.SQL.JSONColumn function.
- Version 10.4
- Fixed FM.RunDatabaseDesignReport and FM.RunSaveAsXML to pass directory for macOS again. If possible we now skip the save dialog and tell FileMaker where to save directly.
- Version 10.3
- Changed WIA.ImageDialog and WIA.SelectDeviceDialog to call FM.InitMessageFilter internally to avoid running into COM error dialogs.
- Fixed an edge case with FM.Loop function where start and end value are zero.
- Version 10.2
- Added FM.CurrentLayoutID, FM.CurrentLayoutName, FM.LayoutIDForLayoutName, FM.LayoutNameForLayoutID and FM.LayoutNames matching similar functions for scripts.
- Version 10.1
- Added FM.GetDisableContextualMenus and FM.SetDisableContextualMenus functions to disable contextual menus.
- Changed FM.InsertRecord, FM.CompareTables, FM.DeleteRecord, FM.DeleteRecords, FM.InsertOrUpdateRecord and FM.UpdateRecord to take table name from first field name if table name is empty.
- Fixed issue with FM.RunDatabaseDesignReport to work in MacOS Catalina. Needs accessibility permissions in system preferences to click save button.
- Version 10.0
- Changed FM.TableStatistics to ignore calculated and global fields.
- Version 9.5
- Added FM.VariableAppend function.
- Version 9.4
- Added fileNames parameter for FM.RunDatabaseDesignReport on MacOS.
- Added FM.ChooseDictionary, FM.GetDictionary and FM.GetDictionaryList to control which dictionary is selected in FileMaker (Mac)
- Version 9.3
- Added FM.CompareTables function.
- Added mode parameter to FM.RunScript and EventMonitor.SetCardWindow functions.
- Changed field quoting for FM.UpdateRecord and others to not quote ROWID as field name.
- Rewrote FM.InsertRecordCSV to support multi line values.
- Version 9.2
- Added FM.RunSaveAsXML function.
- Fixed problem with delimiter detection in FM.InsertRecordCSV.
- Renamed FM.RunDataDesignReport to FM.RunDatabaseDesignReport, but old name stays valid.
- Version 9.1
- Added FM.SQL.Max, FM.SQL.Min, FM.SQL.Avg and FM.SQL.Sum functions.
- Implemented FM.MouseWheelScriptTrigger for MacOS to navigate through records with mouse wheel.
- Rewrote FM.QueryFieldsForTableName and FM.QueryFieldsForBaseTableName to avoid join operation and gain better performance with lots of tables.
- Version 9.0
- Added TotalSize, CountZLIB, SizeZLIB, CountFORK and SizeFORK fields for FM.TableStatistics function.
- Fixed problem with lost time value in FM.SQL.JSONRecord function result.
- Version 8.5
- Added check to FM.InsertOrUpdateRecord2 to detect duplicate fields passed.
- Added delimiter parameter for List.CSVSplit, QuickList.CSVSplit and FM.InsertRecordCSV.
- Changed FM.Loop to return empty text if you have forward going loop with EndValue 0.
- Changed FM.UpdateRecords and related to better return error if parameter count is too small.
- Fixed FM.SQL.Execute to clear lasterror on success.
- Version 8.4
- Changed FM.InsertRecord and other SQL based functions to process field names and remove field name postfix with :: in table names and remove table prefix with :: in Field names.
- Fixed bug in FM.ScriptNames function.
- Version 8.3
- Added ExitIfExpression parameter for FM.Loop to early exit.
- Added FM.InitMessageFilter function to block COM retry dialogs.
- Added FM.VariableAdd function.
- Version 8.2
- Added FM.Beep function.
- Added FM.Loop function.
- Added FM.TableStatistics function.
- Improved FM.InsertRecordCSV and FM.InsertRecordTSV to handle date/time/timestamp fields.
- Improved FM.SQL.CSV function to no longer quote numbers.
- Upgraded FM.DeleteRecord and FM.DeleteRecords to accept 1 to 3 ID values.
- Version 8.1
- Added FM.SQL.JSONRecord and FM.SQL.JSONRecords functions.
- Added FM.PatchNotificationProblem function.
- Version 8.0
- Added FM.UpdateRecord2, FM.UpdateRecord3, FM.UpdateRecords2 and FM.UpdateRecords3.
- Added FM.VariableNames function.
- Changed FM.InsertRecordCSV and FM.InsertRecordTSV to detect whether columns are numbers instead of text and handle it correctly.
- Changed FM.RunDataDesignReport to work better on High Sierra with new Save Dialog.
- Version 7.5
- Added FileName parameter to FM.ScriptNameForScriptID, FM.ScriptIDForScriptName and FM.ScriptNames.
- Version 7.4
- Added checks to ExecuteSQL to return error for ALTER TABLE and CREATE TABLE to remind you to use FM.ExecuteSQLOnIdle.
- Added CSV functions: FM.InsertRecordCSV, List.CSVSplit and QuickList.CSVSplit.
- Added FM.ExecuteSQL.LastSQL function to query last executed SQL command.
- Added optional parameter for FM.RunDataDesignReport to open report after creating it.
- Version 7.2
- Added possibility to specify field and tables by ID for FM.InsertRecord and similar functions.
- Changed FM.SQL.InsertRecordsToSQL to no longer quote by default.
- Version 7.1
- Added ignore rectangle parameters for FM.MouseWheelScriptTrigger function.
- Changed FM.AllowFileDragDrop to also handle PDF files.
- Version 7.0
- Added FM.AllowFileDragDrop function.
- Added FM.SQL.Text and FM.SQL.CSV.
Blog Entries
- FileMaker SQL with Sum, Min, Max and Avg on results
- FileMaker Cloud Tipps & Tricks
- MBS FileMaker Plugin 6.1 für OS X/Windows
- MBS FileMaker Plug-in 6.1 for OS X/Windows
- MBS FileMaker Plugin 6.0 for OS X/Windows
- MBS FileMaker Plugin 3.0 for OS X/Windows - More than 1300 Functions In One Plugin
Example Databases
- CURL/WebViewer Download Images with CURL
- Drag and Drop/for Mac/Image drag from one database to other/Image drag
- Mac only/Drag File Fix
- Shell/Shell
- SQL in FileMaker/ImageGallery
- SQL to other databases/SQL Export
- Text functions/TSV Import
- Utility functions/Command Line Arguments
- Utility functions/TableStatistic
- XML/XSLT
Feedback: Report problem or ask question.
Links
MBS Xojo blog