FileMaker 18 ups its game even more with a whole set of script steps (and a few functions) that allow us to write data to an external file. This can be done without an export. There’s a lot of potential in this FileMaker write data workflow.
I had the chance to play with these script steps and was aware enough to record the exploration. I knew only a little bit about these steps before I started. And during the exploration I learned a lot.
Here’s the recording. It’s rough and unedited. I prepared nothing for the video, so you get to see me developing and figuring this out as I talk (hopefully in a clear way).
So take a look at the video of the FileMaker write data workflow. It is 30 minutes. You’ll probably get a kick out of how I develop. After the video, I have a list of what I learned. Don’t read that yet! Watch the video first 🙂
Jeremy’s exploration of FileMaker write data workflow
What did you think of the video? Send me your thoughts about it here: firstname.lastname@example.org. On to what I learned about the FileMaker write data workflow.
What I learned
Do you do this sometimes? DO you just build a test file and play around with a step or two? As I said in my video, I have thousands of files that explore single new features or help me study for the certification test. My desktop and a “databases” folder are littered with these. But they’re useful because I can test it out and build something for implementation later on.
I learned a lot in this exploration. Here’s what I learned.
- You don’t have to just write to .txt files. Other file types will work, though I like the simplicity of the .txt file.
- There’s a certain workflow, a certain order of steps to follow each time:
- Check if the target file exists
- Create it if it doesn’t
- Open the file
- Get the file’s size (to determine the next position to write to)
- Write the data
- Close the file
- This process has to be in this order.
- If I don’t close the file, I can’t open it again.
- I wonder if I can write to it if I forget to close it. I bet I can.
- In order to identify files, FIleMaker keeps an ID of each one. WE use the ID of the file to target the file to write or close.
- There’s a few functions that identify open files and the position. So I’m using a combination of script steps and functions to do this work.
- I found the script steps that we use here that target a variable to be weird, something to get used to. I like them and I hope this trend continues, but it is weird. These steps can set the value to a field or a variable I like that.
- Since this workflow is a specific order, I find it a good idea to modularize it. I did so in the video above. My public scripts call the “Write Data to File” script and they pass a JSON object ( of course) as a parameter. Here’s mine.
I see this as an important piece: pass to the modular script the file name, the path, and the data as parameters from a parent script.
- There’s a whole lot that we can do with this. . . I just haven’t thought through all those possibilities.
The new workflow: FileMaker write to data is just another star in FileMaker’s rank as the number one Workplace Innovation Platform. In an already-limitless platform, we can do even more.