Create Data File on Server

Like most FileMaker developers I try and save server side scripts for when I really need them. As it happens, if have a task that would be really convenient to run via Perform Script on Server. It involves using the new Create Data File script step to create a very simple text file in the temporary folder, and then sending it on its way via Insert from URL.

Before I go this route and try to monitor for any issues, I was just curious whether this scenario contravenes any general wisdom. Create Data File is relatively new to me, and I feel a bit of trepidation about the whole thing.


The thing that may block you here is not the Data File script steps but the "insert from URL", FM. has neutered the cURL functionality so that it cannot read/send/receive files to the file system. It can only send what is in a container field (or a variable by way of a container field).


Thank you Wim. I am indeed inserting the file back into a container field first.

I am hoping that no one will tell me something like "Creating Files in the temp folder on the server eventually degrades performance or crashes FMServer" or something like that. I'm keeping my fingers crossed.

I do some server-side writing to temp directory with Create Data File and it works pretty dang well in my experience.

1 Like


Can you just use a micro-service instead? You can easily "call" the micro-service from FileMaker using INSERT FROM URL, but the micro-service itself is totally independent and can create files anywhere, in any format, you like.

I can help you with that code if it sounds like something you'd consider.

Let me know.

1 Like

Actually a microservice would be perfect in this situation because we would love to have non-FileMaker sources for this particular process. Honestly we'd really like to branch out more from FileMaker.

On the other hand, the initial doldrums of the Covid-19 outbreak suddenly broke into a storm of re-alignment in our industry. We have to get this project done pronto. So while I can see moving this to a micro-service in the future, for now we've got to do it the old fashioned way.

Writing file logic and setting up a Micro service can be done quickly. I could send you a link to a video I created showing setting up a service starting point in a couple minutes.

The micro-service has the added advantage in that if you branch out from FileMaker, per your reply above, the micro-service lives on! IMHO, the micro-service approach is the best "future-proofing" you can do as it does not rely on FMP at all.

However you decide to go, I wish your project success. :sunglasses:

Thanks for posting back.