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 success, trigger script to start next transfer
Set Variable [ $r; Value: MBS("CURL.SetSucceededScript"; curl; Get(FileName); "Transfer Failed" ) ]
# in case of failure, trigger script to log error
Set Variable [ $r; Value: MBS("CURL.SetFailedScript"; curl; Get(FileName); "Transfer Success" ) ]
See also
- CURL.GetSucceededScriptName
- CURL.Perform
- CURL.PerformAsync
- CURL.PerformInBackground
- CURL.SetFailedScript
Release notes
- Version 14.0
- Added curl triggers for success and failure: CURL.GetFailedEvaluate, CURL.GetFailedFileName, CURL.GetFailedScriptName, CURL.GetSucceededEvaluate, CURL.GetSucceededFileName, CURL.GetSucceededScriptName, CURL.SetFailedEvaluate, CURL.SetFailedScript, CURL.SetSucceededEvaluate, and CURL.SetSucceededScript.
Blog Entries
This function is free to use.
Created 27th December 2023, last changed 9th September 2024