Over 46,000+ Business Solution Developers Find answers, ask questions, and connect with our community of business solutions developers, business owners and partners.
May 22nd, 2019
Included in the release of FileMaker 18 are some new exciting file manipulation scripts steps giving developers the ability to create and edit data files without plugins, saving time and making upgrading FileMaker in the future easier. The following are the new script steps for data files:
- Close Data Fie
- Create Data File
- Delete File
- Get Data File Position
- Get File Exists
- Get File Size
- Open Data File
- Read from Data File
- Rename File
- Set Data File Position
- Write to Data File
Let’s take a look at how to use these script steps.
Creating and Writing to Files
While you can create files of any file extension with the new Create Data File script step, there are a few of things to remember when using the new script steps. A file must always be opened first before writing to it or it will result in an error, even files that you just created. The Open Data File step will return the ID of the file which you will later use in the other script steps. In the example below we create a data file, open it, write to it and close it.
When writing to the file we recommend to error trap and to close the data file if an error occurs; otherwise the data file will remain locked. The Close Data File step uses the ID returned by Open Data File to close it. A file path cannot be used to close the file.
Reading, Renaming and Deleting Files
Just like before, a file must be opened before reading it or renaming it. To delete a file the file must be closed.
With the new file manipulation script steps FileMaker applications can natively create, edit, delete, and read data files without a plug-in, making upgrading FileMaker easier. Contact us if you need help with reading and writing files in your FileMaker application.
Did you know we are an authorized reseller for FileMaker Licensing?
Contact us to discuss upgrading your FileMaker software.
Download the FileMaker File Manipulation Database
Please complete the form below to download your FREE FileMaker database file.
Victor is a calm and easy-going application developer who is committed to doing the best job he can for clients and colleagues alike. A good listener, he has a natural ability to create an environment of trust for those who work with him.