| Components | All | New | MacOS | Windows | Linux | iOS | ||||
| Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old | |
MBS FileMaker Plugin Example Databases
CURL Custom Function
All examples are included with download of MBS FileMaker Plugin.
| Overview | |
| Tables | 1 |
| Relationships | 0 |
| Layouts | 1 |
| Scripts | 1 |
| Value Lists | 0 |
| Custom Functions | 3 |
| Custom Menus | 24 |
| File Options | |
| Default custom menu set | [Standard FileMaker Menus] |
| When opening file | |
| Minimum allowed version | 12.0 |
| Login using | Account Name; Account= Admin |
| Allow user to save password | Off |
| Require iOS passcode | Off |
| Switch to layout | Off |
| Hide all toolbars | Off |
| Script triggers | |
| OnFirstWindowOpen | Off |
| OnLastWindowClose | Off |
| OnWindowOpen | Off |
| OnWindowClose | Off |
| OnFileAVPlayerChange | Off |
| Thumbnail Settings | |
| Generate Thumbnails | On; Temporary |
| Table Name |
Statistics
| Occurrences in Relationship Graph |
| CURL Custom Function |
10 fields defined, 3 records
| CURL Custom Function |
| Table Name: CURL Custom Function - 10 Fields | ||||||||
| Field Name | Type | Options | Comments | On Layouts | In Relationships | In Scripts | In Value Lists | |
| PrimaryKey | Normal, Text | Auto-Enter:
| Unique identifier of each record in this table |
|
|
|
|
|
| CreationTimestamp | Normal, Timestamp | Auto-Enter:
| Date and time each record was created |
|
|
|
|
|
| CreatedBy | Normal, Text | Auto-Enter:
| Account name of the user who created each record |
|
|
|
|
|
| ModificationTimestamp | Normal, Timestamp | Auto-Enter:
| Date and time each record was last modified |
|
|
|
|
|
| ModifiedBy | Normal, Text | Auto-Enter:
| Account name of the user who last modified each record |
|
|
|
|
|
| URL | Normal, Text | Auto-Enter:
|
|
|
||||
| POST Text | Normal, Text | Auto-Enter:
|
|
|
||||
| HTTP Headers | Normal, Text | Auto-Enter:
|
|
|
||||
| Result | Normal, Text | Auto-Enter:
|
|
|
||||
| Debug Messages | Normal, Text | Auto-Enter:
|
|
|
||||
Layout Objects: CURL Custom Function
| Field Name: CURL Custom Function::URL | |||||
| Field Properties | Coordinates | Field Format | Field Behavior | Quick Find | |
|
| Field Format:
| Field Behavior:
| Yes | |
| Field Name: CURL Custom Function::POST Text | |||||
| Field Properties | Coordinates | Field Format | Field Behavior | Quick Find | |
|
| Field Format:
| Field Behavior:
| Yes | |
| Field Name: CURL Custom Function::HTTP Headers | |||||
| Field Properties | Coordinates | Field Format | Field Behavior | Quick Find | |
|
| Field Format:
| Field Behavior:
| Yes | |
| Field Name: CURL Custom Function::Result | |||||
| Field Properties | Coordinates | Field Format | Field Behavior | Quick Find | |
|
| Field Format:
| Field Behavior:
| Yes | |
| Field Name: CURL Custom Function::Debug Messages | |||||
| Field Properties | Coordinates | Field Format | Field Behavior | Quick Find | |
|
| Field Format:
| Field Behavior:
| Yes | |
| Perform |
| Script Name | Perform |
| Run script with full access privileges | Off |
| Include In Menu | Yes |
| Layouts that use this script |
|
| Scripts that use this script |
|
| Script Definition | |
| Script Steps |
|
| Fields used in this script | |
| Scripts used in this script |
|
| Layouts used in this script |
|
| Tables used in this script | |
| Table occurrences used by this script | |
| Custom Functions used by this script | |
| Custom menu set used by this script |
|
| Function Name | Parameters | Availability | Definition | In Field Definitions | In Scripts |
| CURLExecute | URL;Post Text;HTTP Headers | All accounts | Let([ curl = MBS("CURL.New"); // put the URL in for this request r = MBS("CURL.SetOptionURL"; curl; URL); // and some headers if needed r = MBS( "CURL.SetOptionHTTPHeader"; curl; HTTP Headers ); // for POST, we use post text. Keep it empty if you do GET. r = If( Length(Post Text) = 0; ""; MBS("CURL.SetOptionPostFields"; curl; Post Text)); // run the request r = MBS("CURL.Perform"; curl); // we return text as result result = MBS("CURL.GetResultAsText"; curl; "UTF8"); // and put debug log in global variable $$debug = MBS("CURL.GetDebugMessages"; curl); // free the object r = MBS("CURL.Release"; curl)]; result) |
| |
| CURLExecute Download | URL;Post Text;HTTP Headers | All accounts | Let([ curl = MBS("CURL.New"); // put the URL in for this request r = MBS("CURL.SetOptionURL"; curl; URL); // and some headers if needed r = MBS( "CURL.SetOptionHTTPHeader"; curl; HTTP Headers ); // for POST, we use post text. Keep it empty if you do GET. r = If( Length(Post Text) = 0; ""; MBS("CURL.SetOptionPostFields"; curl; Post Text)); // run the request r = MBS("CURL.Perform"; curl); // we return container as result result = MBS("CURL.GetResultAsContainer"; curl); // and put debug log in global variable $$debug = MBS("CURL.GetDebugMessages"; curl); // free the object r = MBS("CURL.Release"; curl)]; result) |
| |
| CURLExecute FTP Upload | URL;Data;User Name;Password | All accounts | Let([ curl = MBS("CURL.New"); // put the URL in for this request r = MBS("CURL.SetOptionURL"; curl; URL); // open input file or container r = If(MBS( "FM.DataType"; Data ) = "container"; MBS( "CURL.SetInputFile"; curl; Data ); // upload container MBS( "CURL.OpenInputFile"; curl; Data )); // open file on disk // Set user name and password r = MBS("CURL.SetOptionUserName"; curl; User Name); r = MBS("CURL.SetOptionPassword"; curl; Password); // don't wait a minute to connect r = MBS("CURL.SetOptionConnectionTimeout"; curl; 10); // set SFTP to use user name and not a private key r = MBS( "CURL.SetOptionSSHAuthTypes"; curl; 2+8 ); // we want an upload r = MBS("CURL.SetOptionUpload"; curl; 1); // run the request result = MBS("CURL.Perform"; curl); // and put debug log in global variable $$debug = MBS("CURL.GetDebugMessages"; curl); // free the object r = MBS("CURL.Release"; curl)]; result) |
|
| Menu Sets | Menus | In Scripts | In Layouts | Comments |
| [Standard FileMaker Menus] |
|
Download example: CURL Custom Function
Used functions:- CURL.GetDebugMessages
- CURL.GetResultAsContainer
- CURL.GetResultAsText
- CURL.New
- CURL.OpenInputFile
- CURL.Perform
- CURL.Release
- CURL.SetInputFile
- CURL.SetOptionConnectionTimeout
- CURL.SetOptionHTTPHeader
- CURL.SetOptionPassword
- CURL.SetOptionPostFields
- CURL.SetOptionSSHAuthTypes
- CURL.SetOptionUpload
- CURL.SetOptionURL
- CURL.SetOptionUserName
- FM.DataType