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

CURL.SetSucceededScript

Sets which script to call when a transfer succeeded.

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

Parameters

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"

Result

Returns OK or error.

Description

Sets which script to call when a transfer succeeded.
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.

Examples

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.SetSucceededEvaluate - CURL.SetTag