MBS FileMaker Plugin Example Databases

callbacks

All examples are included with download of MBS FileMaker Plugin.

callbacks.fmp12

Overview
Tables1
Relationships0
Layouts1
Scripts6
Value Lists0
Custom Functions1
Custom Menus30
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
test
0 fields defined, 0 record
test

Layout Objects: test

Group Buttons

Button PropertiesCoordinatesScript/Script Step
    Type:
  • Text: install callback
    Additional Properties:
  • Change to hand cursor over button
  • Rectangular
  • Top: 18 pt
  • Left: 252 pt
  • Bottom: 43 pt
  • Right: 373 pt
  • Anchoring: Left, Top
Perform Script [ “InstallCallbacks” ]

Scripts:


Web Viewer Controls

Web Viewer Control PropertiesCoordinatesWeb Address
    Object Name:
  • WebViewer
    Additional Properties:
  • Allow interaction with web viewer content
  • Automatically encode URL
  • Top: 48 pt
  • Left: 6 pt
  • Bottom: 558 pt
  • Right: 601 pt
  • Anchoring: Left, Top
"http://www.monkeybreadsoftware.de/filemaker/callbacks.html"

Script Hierarchy

InstallCallbacks
-
WebViewer
Another Script
-
---------| WebViewer Events

Next Script: [-]
Script NameInstallCallbacks
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 [ $result; Value:MBS("WebView.InstallCallback") ]
    • #On Mac oyu must re-load any web page viewers. that may already be in loaded. This is not necesary on the PC
    • Set Web Viewer [ Object Name: "WebViewer"; Action: Reload ]
    • Show Custom Dialog [ Message: $result; Default Button: “OK”, Commit: “Yes” ]
    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: [InstallCallbacks]Next Script: [WebViewer]
                  Script Name-
                  Run script with full access privilegesOff
                  Include In MenuNo
                  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

                                      Previous Script: [-]Next Script: [Another Script]
                                      Script NameWebViewer
                                      Run script with full access privilegesOff
                                      Include In MenuNo
                                      Layouts that use this script
                                        Scripts that use this script
                                          Script Definition
                                          Script Steps
                                          • Show Custom Dialog [ Title: "FileMaker Script: " & Get(ScriptName); Message: "The web viewer sent the following script parameter¶¶" &Quote(Get(ScriptParameter)); Default Button: “OK”, Commit: “Yes”; Button 2: “Cancel”, Commit: “No”; Button 3: “duh”, Commit: “No” ]
                                          • Set Variable [ $Button; Value:Choose(Get(LastMessageChoice); ""; "OK"; "Cancel"; "Duh" ) ]
                                          • Set Variable [ $response; Value:"You pressed the " & Quote($button) & " button" ]
                                          • #send the response back WebView.SetFormValue(WebViewID, FormName, FieldName, Value)
                                          • Set Variable [ $no_result; Value:Let( [ response = $response; WebviewerName = "WebViewer"; jscript = "document.form1.result.value = '" & response & "';"; windowID = MBS( "WebView.FindWindowByTitle" ;Get(WindowName) ); webViewerID = MBS( "WebView.FindByName"; windowID ;"WebViewer" ) ]; MBS("WebView.RunJavaScript";webViewerID ; jscript) ) ]
                                          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: [WebViewer]Next Script: [-]
                                                        Script NameAnother Script
                                                        Run script with full access privilegesOff
                                                        Include In MenuNo
                                                        Layouts that use this script
                                                          Scripts that use this script
                                                            Script Definition
                                                            Script Steps
                                                            • Show Custom Dialog [ Title: "FileMaker Script: " & Get(ScriptName); Message: "The web viewer sent the following script parameter¶¶" &Quote(Get(ScriptParameter)); Default Button: “OK”, Commit: “Yes”; Button 2: “Cancel”, Commit: “No”; Button 3: “duh”, Commit: “No” ]
                                                            • Set Variable [ $Button; Value:Choose(Get(LastMessageChoice); ""; "OK"; "Cancel"; "Duh" ) ]
                                                            • Set Variable [ $response; Value:"You pressed the " & Quote($button) & " button" ]
                                                            • #send the response back WebView.SetFormValue(WebViewID, FormName, FieldName, Value)
                                                            • Set Variable [ $no_result; Value:Let( [ response = $response; WebviewerName = "WebViewer"; jscript = "document.form1.result.value = '" & response & "';"; windowID =MBS( "WebView.FindWindowByTitle" ;Get(WindowName) ); webViewerID = MBS( "WebView.FindByName"; windowID ;"WebViewer" ) ]; MBS("WebView.RunJavaScript";webViewerID ; jscript) ) ]
                                                            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: [Another Script]Next Script: [---------| WebViewer Events]
                                                                          Script Name-
                                                                          Run script with full access privilegesOff
                                                                          Include In MenuNo
                                                                          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

                                                                                              Previous Script: [-]
                                                                                              Script Name---------| WebViewer Events
                                                                                              Run script with full access privilegesOff
                                                                                              Include In MenuNo
                                                                                              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

                                                                                                                  Custom Functions

                                                                                                                  Function NameParametersAvailabilityDefinitionIn Field DefinitionsIn Scripts
                                                                                                                  mbsWebViewerIDWebViewNameAll accountsLet( [ windowID = MBS("Window.FindByTitle";Get(WindowName)); browserID = MBS("WebView.FindByName"; windowID;WebViewName) ]; browserID )

                                                                                                                    Custom Menu Sets

                                                                                                                    Menu SetsMenusIn ScriptsIn LayoutsComments
                                                                                                                    [Standard FileMaker Menus]
                                                                                                                    • All Standard Menus
                                                                                                                    Custom Menu Set 1

                                                                                                                    Download example: callbacks

                                                                                                                    Used functions:




                                                                                                                    Links
                                                                                                                    MBS Xojo Plugins