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

MBS FileMaker Plugin Example Databases

Sales Force Test

All examples are included with download of MBS FileMaker Plugin.

Sales Force Test.fmp12

Overview
Tables1
Relationships0
Layouts1
Scripts2
Value Lists0
Custom Functions0
Custom Menus24
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
Login
10 fields defined, 1 record
Login

Fields

Table Name: Login - 10 Fields
Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
usernameNormal, TextAuto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Repetitions: 1
  • Indexing: None
  • Automatically create indexes as needed
  • Index Language: German
      passwordNormal, TextAuto-Enter:
      • Allow editing
      Validation:
      • Only during data entry
      Storage:
      • Repetitions: 1
      • Indexing: None
      • Automatically create indexes as needed
      • Index Language: German
          EndpointNormal, TextAuto-Enter:
          • Allow editing
          Validation:
          • Only during data entry
          Storage:
          • Repetitions: 1
          • Indexing: None
          • Automatically create indexes as needed
          • Index Language: German
              CURL ResultNormal, TextAuto-Enter:
              • Allow editing
              Validation:
              • Only during data entry
              Storage:
              • Repetitions: 1
              • Indexing: None
              • Automatically create indexes as needed
              • Index Language: German
                  CURL OutputNormal, TextAuto-Enter:
                  • Allow editing
                  Validation:
                  • Only during data entry
                  Storage:
                  • Repetitions: 1
                  • Indexing: None
                  • Automatically create indexes as needed
                  • Index Language: German
                      CURL DebugNormal, TextAuto-Enter:
                      • Allow editing
                      Validation:
                      • Only during data entry
                      Storage:
                      • Repetitions: 1
                      • Indexing: None
                      • Automatically create indexes as needed
                      • Index Language: German
                          XML Template LoginNormal, TextAuto-Enter:
                          • Allow editing
                          Validation:
                          • Only during data entry
                          Storage:
                          • Repetitions: 1
                          • Indexing: None
                          • Automatically create indexes as needed
                          • Index Language: German
                              sessionIdNormal, TextAuto-Enter:
                              • Allow editing
                              Validation:
                              • Only during data entry
                              Storage:
                              • Repetitions: 1
                              • Indexing: None
                              • Automatically create indexes as needed
                              • Index Language: German
                                  userIdNormal, TextAuto-Enter:
                                  • Allow editing
                                  Validation:
                                  • Only during data entry
                                  Storage:
                                  • Repetitions: 1
                                  • Indexing: None
                                  • Automatically create indexes as needed
                                  • Index Language: German
                                      XML Template QueryNormal, TextAuto-Enter:
                                      • Allow editing
                                      Validation:
                                      • Only during data entry
                                      Storage:
                                      • Repetitions: 1
                                      • Indexing: None
                                      • Automatically create indexes as needed
                                      • Index Language: German

                                          Layout Objects: Login

                                          Regular Fields

                                          Field Name: Login::username
                                          Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                          • Top: 60 pt
                                          • Left: 218 pt
                                          • Bottom: 81 pt
                                          • Right: 732 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: Login::password
                                          Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                          • Top: 83 pt
                                          • Left: 218 pt
                                          • Bottom: 104 pt
                                          • Right: 732 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: Login::Endpoint
                                          Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                          • Top: 106 pt
                                          • Left: 218 pt
                                          • Bottom: 127 pt
                                          • Right: 732 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: Login::CURL Result
                                          Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                          • Top: 229 pt
                                          • Left: 218 pt
                                          • Bottom: 250 pt
                                          • Right: 471 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: Login::CURL Output
                                          Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                          • Top: 252 pt
                                          • Left: 218 pt
                                          • Bottom: 370 pt
                                          • Right: 732 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: Login::CURL Debug
                                          Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                          • Top: 376 pt
                                          • Left: 218 pt
                                          • Bottom: 549 pt
                                          • Right: 732 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: Login::XML Template Login
                                          Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                          • Top: 566 pt
                                          • Left: 218 pt
                                          • Bottom: 587 pt
                                          • Right: 471 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: Login::sessionId
                                          Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                          • Top: 162 pt
                                          • Left: 218 pt
                                          • Bottom: 183 pt
                                          • Right: 471 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: Login::userId
                                          Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                          • Top: 185 pt
                                          • Left: 218 pt
                                          • Bottom: 206 pt
                                          • Right: 471 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: Login::XML Template Query
                                          Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                          • Top: 593 pt
                                          • Left: 218 pt
                                          • Bottom: 614 pt
                                          • Right: 471 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

                                          Script Hierarchy

                                          Login
                                          Query

                                          Next Script: [Query]
                                          Script NameLogin
                                          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 [ Login::sessionId; "" ]
                                              • Set Field [ Login::userId; "" ]
                                              • #new session
                                              • Set Variable [ $curl; Value:MBS("CURL.New") ]
                                              • #talk to the URL of server
                                              • Set Variable [ $r; Value:MBS("CURL.SetOptionURL"; $curl; Login::Endpoint) ]
                                              • #we need to specify empty SOAPAction
                                              • Set Variable [ $r; Value:MBS("CURL.SetOptionHTTPHeader"; $curl; "Content-Type: text/xml;charset=UTF-8"; "SOAPAction: \"\"") ]
                                              • #Our XML template where we enter username and password
                                              • Set Variable [ $xml; Value:Login::XML Template Login ]
                                              • Set Variable [ $xml; Value:Substitute($xml; "$username$"; MBS("Text.EncodeToXML"; Login::username)) ]
                                              • Set Variable [ $xml; Value:Substitute($xml; "$password$"; MBS("Text.EncodeToXML"; Login::password)) ]
                                              • Set Variable [ $r; Value:MBS("CURL.SetOptionPostFields"; $curl; $xml) ]
                                              • #Run the query
                                              • Set Variable [ $result; Value:MBS("CURL.Perform"; $curl) ]
                                              • #Query results
                                              • Set Field [ Login::CURL Result; $result ]
                                              • Set Variable [ $httpResponseCode; Value:MBS( "CURL.GetResponseCode"; $curl ) ]
                                              • Set Field [ Login::CURL Result; $r ]
                                              • Set Field [ Login::CURL Output; MBS("CURL.GetResultAsText"; $curl; "UTF8") ]
                                              • Set Field [ Login::CURL Debug; MBS("CURL.GetDebugMessages"; $curl; "UTF8") ]
                                              • If [ $r = "OK" and $httpResponseCode >= 200 and $httpResponseCode < 300 ]
                                              • #If okay, extract the session ID and user ID
                                              • Set Field [ Login::sessionId; MBS( "XML.ExtractText"; MBS( "XML.SubTree"; Login::CURL Output; "Body¶loginResponse¶result¶sessionId")) ]
                                              • Set Field [ Login::userId; MBS( "XML.ExtractText"; MBS( "XML.SubTree"; Login::CURL Output; "Body¶loginResponse¶result¶userId")) ]
                                              • End If
                                              • Set Variable [ $r; 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: [Login]
                                                      Script NameQuery
                                                      Run script with full access privilegesOff
                                                      Include In MenuYes
                                                      Layouts that use this script
                                                        Scripts that use this script
                                                          Script Definition
                                                          Script Steps
                                                          • Set Variable [ $curl; Value:MBS("CURL.New") ]
                                                          • Set Variable [ $r; Value:MBS("CURL.SetOptionURL"; $curl; Login::Endpoint) ]
                                                          • Set Variable [ $r; Value:MBS("CURL.SetOptionHTTPHeader"; $curl; "Content-Type: text/xml;charset=UTF-8"; "SOAPAction: \"\"") ]
                                                          • #using query template to send query
                                                          • Set Variable [ $xml; Value:Login::XML Template Query ]
                                                          • Set Variable [ $xml; Value:Substitute($xml; "$sessionid$"; MBS("Text.EncodeToXML"; Login::sessionId)) ]
                                                          • Set Variable [ $xml; Value:Substitute($xml; "$Query$"; MBS("Text.EncodeToXML"; "SELECT FirstName, LastName FROM Contact")) ]
                                                          • Set Variable [ $r; Value:MBS("CURL.SetOptionPostFields"; $curl; $xml) ]
                                                          • Set Variable [ $r; Value:MBS("CURL.SetDebugWithData"; $curl; 1) ]
                                                          • Set Variable [ $result; Value:MBS("CURL.Perform"; $curl) ]
                                                          • Set Field [ Login::CURL Result; $result ]
                                                          • Set Variable [ $httpResponseCode; Value:MBS( "CURL.GetResponseCode"; $curl ) ]
                                                          • Set Field [ Login::CURL Result; $r ]
                                                          • Set Field [ Login::CURL Output; MBS("CURL.GetResultAsText"; $curl; "UTF8") ]
                                                          • Set Field [ Login::CURL Debug; MBS("CURL.GetDebugMessages"; $curl; "UTF8") ]
                                                          • If [ $r = "OK" and $httpResponseCode >= 200 and $httpResponseCode < 300 ]
                                                          • #Process XML from results here
                                                          • End If
                                                          • Set Variable [ $r; 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

                                                                  Download example: Sales Force Test

                                                                  Used functions: