Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old


Sets which script to call when a transfer failed.

Component Version macOS Windows Linux Server iOS SDK
CURL 14.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "CURL.SetFailedScript"; curl; Filename; ScriptName )   More


Parameter Description Example
curl The CURL session handle. $curl
Filename The database file name where the script is located. "test.fmp12"
ScriptName The script name. "MyScript"


Returns OK or error.


Sets which script to call when a transfer failed.
Works with CURL.Perform, CURL.PerformAsync and CURL.PerformInBackground.

Does not work on server due to missing capability to trigger scripts in the plugin SDK with FileMaker Server.

The transfer is successful if CURL.Perform internally returns no error. For http requests we also check response code for an error.


Set scripts to run on success or failure:

# in case of failure, trigger script to log error
Set Variable [ $r; Value: MBS("CURL.SetSucceededScript"; curl; Get(FileName); "Transfer Failed" ) ]

# in case of success, trigger script to start next transfer
Set Variable [ $r; Value: MBS("CURL.SetFailedScript"; curl; Get(FileName); "Transfer Success" ) ]

See also

Release notes

Blog Entries

This function is free to use.

Created 27th December 2023, last changed 15th January 2024

CURL.SetFailedEvaluate - CURL.SetFinishedEvaluate