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:
12.2
12.3
12.4
12.5
13.0
13.1
13.2
13.3
13.4
13.5
Statistic
FMM
Blog
Inserts records based on CSV text.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
FM FMSQL | 7.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameter | Description | Example | Flags |
---|---|---|---|
InsertFileName | The file name of where the insert table is inside. Can be empty to look for the table in all files. |
Get(FileName) | |
InsertTableName | The name of the table to insert record into. Can be ID of table, so we lookup name by ID. Can be result of GetFieldName() function as we remove field name automatically. |
"Assets" | |
FieldNames | A list of field names for the insert. Empty entries in the list are ignored. If you like to skip a field, you may include a field name multiple time, so the first assignment will then be overwritten by the following assignment. |
"First¶Last¶Zip¶Work City" | |
Text | The text to import in TSV/CSV format. This means tab, comma or semicolon character between fields and newline character for new records. Use Files.ReadTextFile if needed to read this from a file on disk. |
"Bob;Miller;12345;New York" | |
Delimiter | Available in MBS FileMaker Plugin 8.5 or newer. The delimiter to use. If empty, we auto detect it. |
";" | Optional |
FieldName... | A field name to set. | "Model" | Optional |
FieldValue... | A field value to use for setting the field in the parameter before. Data type of parameter must match the data type of the field. |
"Test" | Optional |
Returns OK or error.
Import some contacts with passing import ID/timestamp:
MBS( "FM.InsertRecordCSV"; "Contacts.fmp12"; "Contacts"; "FirstName¶LastName¶City"; $tsv; ""; "ImportID"; $importID; "ImportDate"; Get(CurrentHostTimeStamp))
Import CSV:
MBS( "FM.InsertRecordCSV"; "Kontakte.fmp12"; "Kontakte"; "Vorname¶Nachname¶Firma¶Position"; "Vorname;Nachname;Firma;Position")
Import with escaped returns:
MBS( "FM.InsertRecordCSV"; "Contacts.fmp12"; "Contacts"; "First¶Last¶Work City"; """Christian\rPeter"";Schmitz;""Nickenich\nGermany""")
This function checks for a license.
Created 21st September 2017, last changed 29th January 2023