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

MBS FileMaker Plugin Example Databases

AdobeSign WebService

All examples are included with download of MBS FileMaker Plugin.

AdobeSign WebService.fmp12

Overview
Tables1
Relationships0
Layouts1
Scripts5
Value Lists0
Custom Functions0
Custom Menus33
File Options
Default custom menu set[Standard FileMaker Menus]
When opening file
Minimum allowed version12.0
Login usingAccount Name; Account= Admin
Allow user to save passwordOff
Require iOS passcodeOff
Switch to layoutOff
Hide all toolbarsOff
Script triggers
OnFirstWindowOpenOff
OnLastWindowCloseOff
OnWindowOpenOff
OnWindowCloseOff
OnFileAVPlayerChangeOff
Thumbnail Settings
Generate ThumbnailsOn; Temporary

 

Tables

Table Name
Statistics
Occurrences in Relationship Graph
oAuth
13 fields defined, 2 records
oAuth

Fields

Table Name: oAuth - 13 Fields
Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
Client IDNormal, TextAuto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Repetitions: 1
  • Indexing: None
  • Automatically create indexes as needed
  • Index Language: German
      Client SecretNormal, TextAuto-Enter:
      • Allow editing
      Validation:
      • Only during data entry
      Storage:
      • Repetitions: 1
      • Indexing: None
      • Automatically create indexes as needed
      • Index Language: German
          CodeNormal, TextAuto-Enter:
          • Allow editing
          Validation:
          • Only during data entry
          Storage:
          • Repetitions: 1
          • Indexing: None
          • Automatically create indexes as needed
          • Index Language: German
              TokenAnswerNormal, TextAuto-Enter:
              • Allow editing
              Validation:
              • Only during data entry
              Storage:
              • Repetitions: 1
              • Indexing: None
              • Automatically create indexes as needed
              • Index Language: German
                  Access_TokenNormal, TextAuto-Enter:
                  • Allow editing
                  Validation:
                  • Only during data entry
                  Storage:
                  • Repetitions: 1
                  • Indexing: None
                  • Automatically create indexes as needed
                  • Index Language: German
                      Expires inNormal, TextAuto-Enter:
                      • Allow editing
                      Validation:
                      • Only during data entry
                      Storage:
                      • Repetitions: 1
                      • Indexing: None
                      • Automatically create indexes as needed
                      • Index Language: German
                          Refresh TokenNormal, TextAuto-Enter:
                          • Allow editing
                          Validation:
                          • Only during data entry
                          Storage:
                          • Repetitions: 1
                          • Indexing: None
                          • Automatically create indexes as needed
                          • Index Language: German
                              Query ResultNormal, TextAuto-Enter:
                              • Allow editing
                              Validation:
                              • Only during data entry
                              Storage:
                              • Repetitions: 1
                              • Indexing: None
                              • Automatically create indexes as needed
                              • Index Language: German
                                  Debug MessagesNormal, TextAuto-Enter:
                                  • Allow editing
                                  Validation:
                                  • Only during data entry
                                  Storage:
                                  • Repetitions: 1
                                  • Indexing: None
                                  • Automatically create indexes as needed
                                  • Index Language: German
                                      Account IDNormal, TextAuto-Enter:
                                      • Allow editing
                                      Validation:
                                      • Only during data entry
                                      Storage:
                                      • Repetitions: 1
                                      • Indexing: None
                                      • Automatically create indexes as needed
                                      • Index Language: German
                                            Debug InputNormal, TextAuto-Enter:
                                            • Allow editing
                                            Validation:
                                            • Only during data entry
                                            Storage:
                                            • Repetitions: 1
                                            • Indexing: None
                                            • Automatically create indexes as needed
                                            • Index Language: German
                                                Final URLNormal, TextAuto-Enter:
                                                • Allow editing
                                                Validation:
                                                • Only during data entry
                                                Storage:
                                                • Repetitions: 1
                                                • Indexing: None
                                                • Automatically create indexes as needed
                                                • Index Language: German
                                                        PDFNormal, BinaryAuto-Enter:
                                                        • Allow editing
                                                        Validation:
                                                        • Only during data entry
                                                        Storage:
                                                        • Repetitions: 1

                                                            Layout Objects: oAuth

                                                            Regular Fields

                                                            Field Name: oAuth::Client ID
                                                            Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                            • Top: 48 pt
                                                            • Left: 138 pt
                                                            • Bottom: 62 pt
                                                            • Right: 563 pt
                                                            • Anchoring: Left, Top
                                                            Field Format:
                                                            • Edit Box
                                                            Field Behavior:
                                                            • Allow field to be entered: In Find mode, In Browse mode
                                                            • Touch keyboard type: System Default
                                                            • Go to next field using: Tab key
                                                            Yes

                                                            Field Name: oAuth::Client Secret
                                                            Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                            • Top: 66 pt
                                                            • Left: 138 pt
                                                            • Bottom: 80 pt
                                                            • Right: 563 pt
                                                            • Anchoring: Left, Top
                                                            Field Format:
                                                            • Edit Box
                                                            Field Behavior:
                                                            • Allow field to be entered: In Find mode, In Browse mode
                                                            • Touch keyboard type: System Default
                                                            • Go to next field using: Tab key
                                                            Yes

                                                            Field Name: oAuth::Code
                                                            Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                            • Top: 84 pt
                                                            • Left: 138 pt
                                                            • Bottom: 98 pt
                                                            • Right: 563 pt
                                                            • Anchoring: Left, Top
                                                            Field Format:
                                                            • Edit Box
                                                            Field Behavior:
                                                            • Allow field to be entered: In Find mode, In Browse mode
                                                            • Touch keyboard type: System Default
                                                            • Go to next field using: Tab key
                                                            Yes

                                                            Field Name: oAuth::TokenAnswer
                                                            Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                            • Top: 102 pt
                                                            • Left: 138 pt
                                                            • Bottom: 116 pt
                                                            • Right: 563 pt
                                                            • Anchoring: Left, Top
                                                            Field Format:
                                                            • Edit Box
                                                            Field Behavior:
                                                            • Allow field to be entered: In Find mode, In Browse mode
                                                            • Touch keyboard type: System Default
                                                            • Go to next field using: Tab key
                                                            Yes

                                                            Field Name: oAuth::Expires in
                                                            Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                            • Top: 138 pt
                                                            • Left: 138 pt
                                                            • Bottom: 152 pt
                                                            • Right: 563 pt
                                                            • Anchoring: Left, Top
                                                            Field Format:
                                                            • Edit Box
                                                            Field Behavior:
                                                            • Allow field to be entered: In Find mode, In Browse mode
                                                            • Touch keyboard type: System Default
                                                            • Go to next field using: Tab key
                                                            Yes

                                                            Field Name: oAuth::Access_Token
                                                            Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                            • Top: 120 pt
                                                            • Left: 138 pt
                                                            • Bottom: 134 pt
                                                            • Right: 563 pt
                                                            • Anchoring: Left, Top
                                                            Field Format:
                                                            • Edit Box
                                                            Field Behavior:
                                                            • Allow field to be entered: In Find mode, In Browse mode
                                                            • Touch keyboard type: System Default
                                                            • Go to next field using: Tab key
                                                            Yes

                                                            Field Name: oAuth::Refresh Token
                                                            Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                            • Top: 156 pt
                                                            • Left: 138 pt
                                                            • Bottom: 170 pt
                                                            • Right: 563 pt
                                                            • Anchoring: Left, Top
                                                            Field Format:
                                                            • Edit Box
                                                            Field Behavior:
                                                            • Allow field to be entered: In Find mode, In Browse mode
                                                            • Touch keyboard type: System Default
                                                            • Go to next field using: Tab key
                                                            Yes

                                                            Field Name: oAuth::Query Result
                                                            Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                            • Top: 604 pt
                                                            • Left: 12 pt
                                                            • Bottom: 760 pt
                                                            • Right: 561 pt
                                                            • Anchoring: Left, Top
                                                            Field Format:
                                                            • Edit Box
                                                            Field Behavior:
                                                            • Allow field to be entered: In Find mode, In Browse mode
                                                            • Touch keyboard type: System Default
                                                            • Go to next field using: Tab key
                                                            Yes

                                                            Field Name: oAuth::Debug Messages
                                                            Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                            • Top: 604 pt
                                                            • Left: 592 pt
                                                            • Bottom: 760 pt
                                                            • Right: 1087 pt
                                                            • Anchoring: Left, Top
                                                            Field Format:
                                                            • Edit Box
                                                            • Include vertical scrollbar
                                                            Field Behavior:
                                                            • Allow field to be entered: In Find mode, In Browse mode
                                                            • Touch keyboard type: Default for Data Type
                                                            • Go to next field using: Tab key
                                                            Yes

                                                            Field Name: oAuth::Account ID
                                                            Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                            • Top: 173 pt
                                                            • Left: 138 pt
                                                            • Bottom: 187 pt
                                                            • Right: 391 pt
                                                            • Anchoring: Left, Top
                                                            Field Format:
                                                            • Edit Box
                                                            Field Behavior:
                                                            • Allow field to be entered: In Find mode, In Browse mode
                                                            • Touch keyboard type: Default for Data Type
                                                            • Go to next field using: Tab key
                                                            Yes

                                                            Field Name: oAuth::Debug Input
                                                            Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                            • Top: 74 pt
                                                            • Left: 592 pt
                                                            • Bottom: 173 pt
                                                            • Right: 1087 pt
                                                            • Anchoring: Left, Top
                                                            Field Format:
                                                            • Edit Box
                                                            Field Behavior:
                                                            • Allow field to be entered: In Find mode, In Browse mode
                                                            • Touch keyboard type: Default for Data Type
                                                            • Go to next field using: Tab key
                                                            Yes

                                                            Field Name: oAuth::Access_Token
                                                            Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                            • Top: 192 pt
                                                            • Left: 592 pt
                                                            • Bottom: 566 pt
                                                            • Right: 1087 pt
                                                            • Anchoring: Left, Top
                                                            Field Format:
                                                            • Edit Box
                                                            Field Behavior:
                                                            • Allow field to be entered: In Find mode, In Browse mode
                                                            • Touch keyboard type: System Default
                                                            • Go to next field using: Tab key
                                                            Yes

                                                            Field Name: oAuth::PDF
                                                            Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                            • Top: 305 pt
                                                            • Left: 1133 pt
                                                            • Bottom: 532 pt
                                                            • Right: 1435 pt
                                                            • Anchoring: Left, Top
                                                            Field Format:
                                                            • Edit Box
                                                            Field Behavior:
                                                            • Allow field to be entered: In Find mode, In Browse mode
                                                            • Touch keyboard type: Default for Data Type
                                                            • Go to next field using: Tab key
                                                            No

                                                            Buttons

                                                            Button PropertiesCoordinatesScript/Script Step
                                                              Type:
                                                            • Text: Ask for Token
                                                            • Top: 93 pt
                                                            • Left: 1165 pt
                                                            • Bottom: 139 pt
                                                            • Right: 1343 pt
                                                            • Anchoring: Left, Top
                                                            Perform Script [ “Ask for token” ]

                                                            Scripts:


                                                            Button PropertiesCoordinatesScript/Script Step
                                                              Type:
                                                            • Text: Uploading a Document
                                                            • Top: 252 pt
                                                            • Left: 1165 pt
                                                            • Bottom: 298 pt
                                                            • Right: 1343 pt
                                                            • Anchoring: Left, Top
                                                            Perform Script [ “Upload” ]

                                                            Scripts:


                                                            Button PropertiesCoordinatesScript/Script Step
                                                              Type:
                                                            • Text: Pick Token
                                                            • Top: 146 pt
                                                            • Left: 1165 pt
                                                            • Bottom: 192 pt
                                                            • Right: 1343 pt
                                                            • Anchoring: Left, Top
                                                            Perform Script [ “Pick token” ]

                                                            Scripts:


                                                            Button PropertiesCoordinatesScript/Script Step
                                                              Type:
                                                            • Text: Get Access Token
                                                            • Top: 199 pt
                                                            • Left: 1165 pt
                                                            • Bottom: 245 pt
                                                            • Right: 1343 pt
                                                            • Anchoring: Left, Top
                                                            Perform Script [ “Get Access Token” ]

                                                            Scripts:


                                                            Web Viewer Controls

                                                            Web Viewer Control PropertiesCoordinatesWeb Address
                                                              Object Name:
                                                            • web
                                                              Additional Properties:
                                                            • Allow interaction with web viewer content
                                                            • Display progress bar
                                                            • Display status messages
                                                            • Automatically encode URL
                                                            • Top: 192 pt
                                                            • Left: 12 pt
                                                            • Bottom: 577 pt
                                                            • Right: 563 pt
                                                            • Anchoring: Left, Top

                                                            Script Hierarchy

                                                            Ask for token
                                                            Pick token
                                                            Clear
                                                            Get Access Token
                                                            Upload

                                                            Next Script: [Pick token]
                                                            Script NameAsk for token
                                                            Run script with full access privilegesOff
                                                            Include In MenuYes
                                                            Layouts that use this script
                                                            Scripts that use this script
                                                              Script Definition
                                                              Script Steps
                                                              • #you may need your own redirect URL...
                                                              • Set Variable [ $redirectURL; Value:"https://www.monkeybreadsoftware.com/filemaker/examples/param.php" ]
                                                              • #send user to login panel...
                                                              • Set Variable [ $URL; Value:"https://secure.echosign.com/public/oauth?redirect_uri=" & $redirectURL & "&response_type=code&client_id=" & oAuth::Client ID & "&scope=user_login:account agreement_send:account" ]
                                                              • Set Web Viewer [ Object Name: "web"; URL: $URL ]
                                                              • Set Field [ oAuth::Debug Input; $URL ]
                                                              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

                                                                      Previous Script: [Ask for token]Next Script: [Clear]
                                                                      Script NamePick token
                                                                      Run script with full access privilegesOff
                                                                      Include In MenuYes
                                                                      Layouts that use this script
                                                                      Scripts that use this script
                                                                        Script Definition
                                                                        Script Steps
                                                                        • #Copy token from webview
                                                                        • Set Variable [ $text; Value:MBS( "WebView.GetPlainText"; "web" ) ]
                                                                        • Set Variable [ $text; Value:Trim($text) ]
                                                                        • Set Variable [ $text; Value:Trim($text) ]
                                                                        • If [ Left ( $text ; 5 ) = "code=" ]
                                                                        • Set Variable [ $text; Value:Middle ( $text ; 6; Length($text) ) ]
                                                                        • Set Variable [ $p; Value:Position ( $Text ; "&" ; 1 ; 1 ) ]
                                                                        • Set Field [ oAuth::Code; Middle ( $text ; 1; $p-1 ) ]
                                                                        • End If
                                                                        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

                                                                                Previous Script: [Pick token]Next Script: [Get Access Token]
                                                                                Script NameClear
                                                                                Run script with full access privilegesOff
                                                                                Include In MenuYes
                                                                                Layouts that use this script
                                                                                  Scripts that use this script
                                                                                    Script Definition
                                                                                    Script Steps
                                                                                    • Set Field [ oAuth::Code; "" ]
                                                                                    • Set Field [ oAuth::TokenAnswer; "" ]
                                                                                    • Set Field [ oAuth::Access_Token; "" ]
                                                                                    • Set Field [ oAuth::Expires in; "" ]
                                                                                    • Set Field [ oAuth::Refresh Token; "" ]
                                                                                    • Set Field [ oAuth::Query Result; "" ]
                                                                                    • Set Field [ oAuth::Debug Messages; "" ]
                                                                                    • Set Field [ oAuth::Debug Input; "" ]
                                                                                    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

                                                                                            Previous Script: [Clear]Next Script: [Upload]
                                                                                            Script NameGet Access Token
                                                                                            Run script with full access privilegesOff
                                                                                            Include In MenuYes
                                                                                            Layouts that use this script
                                                                                            Scripts that use this script
                                                                                              Script Definition
                                                                                              Script Steps
                                                                                              • #see also https://secure.na1.echosign.com/public/static/oauthDoc.jsp
                                                                                              • Set Variable [ $redirectURL; Value:"https://www.monkeybreadsoftware.com/filemaker/examples/param.php" ]
                                                                                              • #Start new session
                                                                                              • Set Variable [ $curl; Value:MBS("CURL.New") ]
                                                                                              • #Set URL to load (HTTP, HTTPS, FTP, FTPS, SFTP, etc.)
                                                                                              • #You need to check which URL you got back with token to query
                                                                                              • Set Variable [ $r; Value:MBS("CURL.SetOptionURL"; $curl; "https://api.echosign.com/oauth/token") ]
                                                                                              • Set Variable [ $r; Value:MBS("CURL.SetOptionHTTPHeader"; $curl; "application/x-www-form-urlencoded") ]
                                                                                              • Set Variable [ $r; Value:MBS("CURL.SetDebugWithData"; $curl; 1) ]
                                                                                              • Set Variable [ $request; Value:"code=" & oAuth::Code & "&client_id=" & oAuth::Client ID & "&redirect_uri=" & $redirectURL& "&client_secret=" & oAuth::Client Secret & "&grant_type=authorization_code" ]
                                                                                              • Set Variable [ $r; Value:MBS("CURL.SetOptionPostFields"; $curl; $request) ]
                                                                                              • Set Variable [ $r; Value:MBS("CURL.SetOptionPost"; $curl; 1) ]
                                                                                              • #RUN now
                                                                                              • Set Variable [ $r; Value:MBS("CURL.Perform"; $curl) ]
                                                                                              • #Check result
                                                                                              • Set Variable [ $json; Value:MBS("CURL.GetResultAsText"; $curl; "UTF8") ]
                                                                                              • Set Field [ oAuth::Debug Input; $request ]
                                                                                              • Set Field [ oAuth::Query Result; $json ]
                                                                                              • Set Field [ oAuth::Debug Messages; MBS("CURL.GetDebugMessages"; $curl) ]
                                                                                              • Set Variable [ $ResponseCode; Value:MBS( "CURL.GetResponseCode"; $curl ) ]
                                                                                              • If [ $r = "OK" and $ResponseCode = 200 ]
                                                                                              • Set Variable [ $access_token; Value:MBS( "JSON.GetPathItem"; $json; "access_token"; 3 ) ]
                                                                                              • Set Variable [ $expires_in; Value:MBS( "JSON.GetPathItem"; $json; "expires_in"; 3 ) ]
                                                                                              • Set Variable [ $refresh_token; Value:MBS( "JSON.GetPathItem"; $json; "refresh_token"; 3 ) ]
                                                                                              • Set Variable [ $refresh_token_expires_in; Value:MBS( "JSON.GetPathItem"; $json; "refresh_token_expires_in"; 3 ) ]
                                                                                              • Set Variable [ $token_type; Value:MBS( "JSON.GetPathItem"; $json; "token_type"; 3 ) ]
                                                                                              • Set Field [ oAuth::Access_Token; $access_token ]
                                                                                              • Set Field [ oAuth::Refresh Token; $refresh_token ]
                                                                                              • End If
                                                                                              • #Cleanup
                                                                                              • Set Variable [ $result; Value:MBS("CURL.Cleanup"; $curl) ]
                                                                                              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

                                                                                                      Previous Script: [Get Access Token]
                                                                                                      Script NameUpload
                                                                                                      Run script with full access privilegesOff
                                                                                                      Include In MenuYes
                                                                                                      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

                                                                                                                Download example: AdobeSign WebService

                                                                                                                Used functions: