No one has any idea ?
Have you tried using Get ( DocumentsPath )? Get ( TemporaryPath ) is session-specific and may not persist long enough for the export / import operation to complete. (Just a guess.)
Thanks for your help but the problem is that
"Export Field Contents" and "Insert File" are not functions that are supported in an server script.
Oh, I see; didn't check that. Sorry.
So you want a workaround for the server-side compatibility limitation? You'll probably need to set up a robot (a dedicated client) to run the script using an OnTimer script.
We do this kind of thing by installing FileMaker Client on the server hosting the databases (this works well and runs fast due to no network bottlenecks).
We create an empty database (we call it FMBot.fmp12) and create a user account in it using the same credentials as an account in the target hosted DB (we use FMBot as the account and give it [Full Access] privileges). We then set the FMBot db to login automatically with that account and give it a script trigger (OnFirstWindowOpen) to launch a script.
That script then just calls a script in the hosted DB to run our FMServer-incompatible-tasks. Finally, once the script in the hosted DB completes, control returns to the FMBot DB which quits FMP Client.
We trigger this hourly or daily as required using TaskScheduler on PC or a LaunchDaemon job on MacOS, it doesn't require a user to be logged in and will run as a background task.
Ok thanks I'm gonna try this.