MBS FileMaker Plugin Example Databases

Install Plugin Update if needed

All examples are included with download of MBS FileMaker Plugin.

Install Plugin Update if needed.fmp12

Overview
Tables1
Relationships0
Layouts1
Scripts4
Value Lists0
Custom Functions0
Custom Menus0
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
Install Plugin Update if needed
9 fields defined, 1 record
Install Plugin Update if needed

Fields

Table Name: Install Plugin Update if needed - 9 Fields
Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
Plugin File MacNormal, BinaryAuto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Repetitions: 1
      Plugin File Win 32bitNormal, BinaryAuto-Enter:
      • Allow editing
      Validation:
      • Only during data entry
      Storage:
      • Repetitions: 1
          Version DisplayNormal, TextAuto-Enter:
          • Allow editing
          Validation:
          • Only during data entry
          Storage:
          • Repetitions: 1
          • Indexing: None
          • Automatically create indexes as needed
          • Index Language: German
              Plugin File Win 64bitNormal, BinaryAuto-Enter:
              • Allow editing
              Validation:
              • Only during data entry
              Storage:
              • Repetitions: 1
                  Version NumberNormal, TextAuto-Enter:
                  • Allow editing
                  Validation:
                  • Only during data entry
                  Storage:
                  • Repetitions: 1
                  • Indexing: None
                  • Automatically create indexes as needed
                  • Index Language: German
                      MBS InstalledCalculated, NumberCalculation: Auto-Enter:
                      • Always evaluate
                      Storage:
                      • Repetitions: 1
                      • Do not store calculation results
                      • Index Language: German
                          MBS Installed VersionCalculated, NumberCalculation: Auto-Enter:
                          • Always evaluate
                          Storage:
                          • Repetitions: 1
                          • Do not store calculation results
                          • Index Language: German
                              MBS Installed Version NumberCalculated, NumberCalculation: Auto-Enter:
                              • Always evaluate
                              Storage:
                              • Repetitions: 1
                              • Do not store calculation results
                              • Index Language: German
                                  Plugin File LinuxNormal, BinaryAuto-Enter:
                                  • Allow editing
                                  Validation:
                                  • Only during data entry
                                  Storage:
                                  • Repetitions: 1

                                      Layout Objects: Install Plugin Update if needed

                                      Regular Fields

                                      Field Name: Install Plugin Update if needed::Plugin File Mac
                                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                      • Top: 65 pt
                                      • Left: 138 pt
                                      • Bottom: 190 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: System Default
                                      • Go to next field using: Tab key
                                      No

                                      Field Name: Install Plugin Update if needed::Plugin File Win 32bit
                                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                      • Top: 192 pt
                                      • Left: 138 pt
                                      • Bottom: 317 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: System Default
                                      • Go to next field using: Tab key
                                      No

                                      Field Name: Install Plugin Update if needed::Version Display
                                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                      • Top: 576 pt
                                      • Left: 137 pt
                                      • Bottom: 598 pt
                                      • Right: 390 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: Install Plugin Update if needed::Plugin File Win 64bit
                                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                      • Top: 320 pt
                                      • Left: 138 pt
                                      • Bottom: 445 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: System Default
                                      • Go to next field using: Tab key
                                      No

                                      Field Name: Install Plugin Update if needed::Version Number
                                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                      • Top: 601 pt
                                      • Left: 137 pt
                                      • Bottom: 623 pt
                                      • Right: 390 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: Install Plugin Update if needed::MBS Installed
                                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                      • Top: 6 pt
                                      • Left: 138 pt
                                      • Bottom: 28 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: System Default
                                      • Go to next field using: Tab key
                                      Yes

                                      Field Name: Install Plugin Update if needed::MBS Installed Version
                                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                      • Top: 31 pt
                                      • Left: 138 pt
                                      • Bottom: 53 pt
                                      • Right: 256 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: Install Plugin Update if needed::MBS Installed Version Number
                                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                      • Top: 31 pt
                                      • Left: 267 pt
                                      • Bottom: 53 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: System Default
                                      • Go to next field using: Tab key
                                      Yes

                                      Field Name: Install Plugin Update if needed::Plugin File Linux
                                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                      • Top: 448 pt
                                      • Left: 138 pt
                                      • Bottom: 573 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
                                      No

                                      Buttons

                                      Button PropertiesCoordinatesScript/Script Step
                                        Type:
                                      • Text: Check MBS Version
                                      • Top: 84 pt
                                      • Left: 412 pt
                                      • Bottom: 118 pt
                                      • Right: 536 pt
                                      • Anchoring: Left, Top
                                      Perform Script [ “Check If Update is Needed” ]

                                      Scripts:


                                      Button PropertiesCoordinatesScript/Script Step
                                        Type:
                                      • Text: Copy Version
                                      • Top: 578 pt
                                      • Left: 524 pt
                                      • Bottom: 614 pt
                                      • Right: 603 pt
                                      • Anchoring: Left, Top
                                      Perform Script [ “Copy Version Numbers” ]

                                      Scripts:


                                      Script Hierarchy

                                      Install MBS Plugin
                                      Check If Update is Needed
                                      Copy Version Numbers
                                      Clear

                                      Next Script: [Check If Update is Needed]
                                      Script NameInstall MBS Plugin
                                      Run script with full access privilegesOff
                                      Include In MenuYes
                                      Layouts that use this script
                                        Scripts that use this script
                                        Script Definition
                                        Script Steps
                                        • # Check Architecture
                                        • # will be ? for older 32-bit FileMaker Pro
                                        • Set Variable [ $Arch; Value:GetAsText( Get (ApplicationArchitecture)) ]
                                        • # Check Platform
                                        • Set Variable [ $Plat; Value:Get ( SystemPlatform ) ]
                                        • If [ $Plat = 1 ]
                                        • # Mac
                                        • Install Plug-In File [ Install Plugin Update if needed::Plugin File Mac ]
                                        • Else If [ $Plat = 3 ]
                                        • # iOS
                                        • Exit Script [ ]
                                        • Else If [ $Plat = 4 ]
                                        • # Web Direct
                                        • If [ MBS( "IsWindows" ) = 1 ]
                                        • # Win Server
                                        • Install Plug-In File [ Install Plugin Update if needed::Plugin File Win 64bit ]
                                        • Else
                                        • # Mac Server
                                        • Install Plug-In File [ Install Plugin Update if needed::Plugin File Mac ]
                                        • End If
                                        • Exit Script [ ]
                                        • Else If [ $Plat = 5 ]
                                        • # FileMaker Cloud
                                        • Install Plug-In File [ Install Plugin Update if needed::Plugin File Linux ]
                                        • Else If [ $Plat = -2 ]
                                        • # Win
                                        • If [ $Arch = "x86_64" ]
                                        • # Win 64-bit
                                        • Install Plug-In File [ Install Plugin Update if needed::Plugin File Win 64bit ]
                                        • Else
                                        • # Win 32-bit
                                        • Install Plug-In File [ Install Plugin Update if needed::Plugin File Win 32bit ]
                                        • End If
                                        • Else
                                        • # something new or old?
                                        • Exit Script [ ]
                                        • End If
                                        • Set Variable [ $LastError; Value:Get(LastError) ]
                                        • If [ $LastError = 0 ]
                                        • If [ MBS("VersionAutoUpdate") = Install Plugin Update if needed::Version Number ]
                                        • Show Custom Dialog [ Title: "Success"; Message: "Installed MBS Plugin: " & MBS("Version"); Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                        • Else
                                        • Show Custom Dialog [ Title: "Success"; Message: "Installed MBS Plugin: " & Install Plugin Update if needed::Version Display & ¶ & "Please restart FileMaker."; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                        • End If
                                        • Else
                                        • Show Custom Dialog [ Title: "Failed"; Message: "Failed to install plugin due to error " & $LastError; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                        • 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: [Install MBS Plugin]Next Script: [Copy Version Numbers]
                                                Script NameCheck If Update is Needed
                                                Run script with full access privilegesOff
                                                Include In MenuYes
                                                Layouts that use this script
                                                Scripts that use this script
                                                  Script Definition
                                                  Script Steps
                                                  • #Check what plugin version we have here in the database:
                                                  • Go to Layout [ “Install Plugin Update if needed” ]
                                                  • Go to Record/Request/Page [ First ]
                                                  • Set Variable [ $DatabaseVersion; Value:GetAsNumber(Install Plugin Update if needed::Version Number) ]
                                                  • Set Variable [ $InstalledVersion; Value:GetAsNumber(MBS("VersionAutoUpdate")) ]
                                                  • Set Variable [ $InstalledVersionText; Value:GetAsText(MBS("Version")) ]
                                                  • If [ GetAsNumber($InstalledVersion) = "?" ]
                                                  • #not installed
                                                  • Show Custom Dialog [ Message: "MBS Plugin is not installed. Can we install version " & Install Plugin Update if needed::Version Display & " is of MBS plugin now?"; Default Button: “Install”, Commit: “Yes”; Button 2: “Later”, Commit: “Yes” ]
                                                  • If [ Get ( LastMessageChoice ) = 1 ]
                                                  • Perform Script [ “Install MBS Plugin” ]
                                                  • End If
                                                  • Else If [ $InstalledVersion = $DatabaseVersion ]
                                                  • #current version
                                                  • Show Custom Dialog [ Message: "Already up to date"; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                                  • Else If [ $InstalledVersion > $DatabaseVersion ]
                                                  • #newer version
                                                  • Show Custom Dialog [ Message: "Already up to date. Installed version " & $InstalledVersionText & " is newer than version " & Install Plugin Update if needed::Version Display & " in database."; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                                  • Else
                                                  • #found update
                                                  • Show Custom Dialog [ Message: "Newer Version " & Install Plugin Update if needed::Version Display & " is available. Install now?" & ¶ & "You have version " & $InstalledVersionText; Default Button: “Install”, Commit: “Yes”; Button 2: “Later”, Commit: “Yes” ]
                                                  • If [ Get ( LastMessageChoice ) = 1 ]
                                                  • Perform Script [ “Install MBS Plugin” ]
                                                  • End If
                                                  • End If
                                                  • #go to fields to update them
                                                  • Go to Field [ Install Plugin Update if needed::MBS Installed ]
                                                  • Go to Field [ Install Plugin Update if needed::MBS Installed Version ]
                                                  • Go to Field [ Install Plugin Update if needed::MBS Installed Version Number ]
                                                  • Commit Records/Requests [ Skip data entry validation; No dialog ]
                                                  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: [Check If Update is Needed]Next Script: [Clear]
                                                      Script NameCopy Version Numbers
                                                      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 [ Install Plugin Update if needed::Version Number; Install Plugin Update if needed::MBS Installed Version Number ]
                                                        • Set Field [ Install Plugin Update if needed::Version Display; Install Plugin Update if needed::MBS Installed Version ]
                                                        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: [Copy Version Numbers]
                                                                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 [ Install Plugin Update if needed::Version Display; "" ]
                                                                    • Set Field [ Install Plugin Update if needed::Version Number; "" ]
                                                                    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: Install Plugin Update if needed




                                                                            Links
                                                                            MBS FileMaker Plugins