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

MBS FileMaker Plugin Example Databases

Find FileMaker Databases

All examples are included with download of MBS FileMaker Plugin.

Find FileMaker Databases.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
Search
6 fields defined, 0 record
Search

Fields

Table Name: Search - 6 Fields
Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
NameNormal, TextAuto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Repetitions: 1
  • Indexing: None
  • Automatically create indexes as needed
  • Index Language: German
          FilePathNormal, TextAuto-Enter:
          • Allow editing
          Validation:
          • Only during data entry
          Storage:
          • Repetitions: 1
          • Indexing: None
          • Automatically create indexes as needed
          • Index Language: German
              IconNormal, BinaryAuto-Enter:
              • Allow editing
              Validation:
              • Only during data entry
              Storage:
              • Repetitions: 1
                      Attributes JSONNormal, TextAuto-Enter:
                      • Allow editing
                      Validation:
                      • Only during data entry
                      Storage:
                      • Repetitions: 1
                      • Indexing: None
                      • Automatically create indexes as needed
                      • Index Language: German
                              All Results JSONNormal, TextAuto-Enter:
                              • Allow editing
                              Validation:
                              • Only during data entry
                              Storage:
                              • Global
                              • Repetitions: 1
                              • Index Language: German
                                    ResultCountNormal, NumberAuto-Enter:
                                    • Allow editing
                                    Validation:
                                    • Only during data entry
                                    Storage:
                                    • Global
                                    • Repetitions: 1
                                    • Index Language: German

                                        Layout Objects: Search

                                        Regular Fields

                                        Field Name: Search::FilePath
                                        Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                        • Top: 88 pt
                                        • Left: 9 pt
                                        • Bottom: 109 pt
                                        • Right: 1110 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: Search::ResultCount
                                        Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                        • Top: 10 pt
                                        • Left: 161 pt
                                        • Bottom: 31 pt
                                        • Right: 211 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: Find Databases
                                        • Top: 10 pt
                                        • Left: 9 pt
                                        • Bottom: 45 pt
                                        • Right: 149 pt
                                        • Anchoring: Left, Top
                                        Perform Script [ “Search Databases synchronously” ]

                                        Scripts:


                                        Script Hierarchy

                                        Search Databases synchronously
                                        Search Databases asynchronously
                                        Handle Result
                                        Clear

                                        Next Script: [Search Databases asynchronously]
                                        Script NameSearch Databases synchronously
                                        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 [ $query; Value:MBS( "MetaDataQuery.Create" ) ]
                                          • Set Variable [ $r; Value:MBS( "MetaDataQuery.SetQueryString"; $Query; "kMDItemKind=\"FileMaker Document\"") ]
                                          • Set Variable [ $r; Value:MBS( "MetaDataQuery.StartQuery"; $Query) ]
                                          • #Wait for it to finish
                                          • Loop
                                          • Pause/Resume Script [ Duration (seconds): ,2 ]
                                          • Exit Loop If [ MBS( "MetaDataQuery.IsGathering"; $Query ) = 0 ]
                                          • End Loop
                                          • #Stop
                                          • Set Variable [ $r; Value:MBS( "MetaDataQuery.StopQuery"; $Query) ]
                                          • Delete All Records [ No dialog ]
                                          • #Put global result on top:
                                          • Set Variable [ $Count; Value:MBS( "MetaDataQuery.ResultCount"; $Query ) ]
                                          • Set Field [ Search::ResultCount; $Count ]
                                          • If [ $count > 0 ]
                                          • #And show records:
                                          • Set Variable [ $index; Value:0 ]
                                          • Loop
                                          • New Record/Request
                                          • Set Variable [ $path; Value:MBS( "MetaDataQuery.PathAtIndex"; $Query; $Index ) ]
                                          • Set Field [ Search::FilePath; $path ]
                                          • Commit Records/Requests [ No dialog ]
                                          • #next
                                          • Set Variable [ $index; Value:$index + 1 ]
                                          • Exit Loop If [ $index ≥ $count ]
                                          • End Loop
                                          • Set Variable [ $r; Value:MBS( "MetaDataQuery.Close"; $Query ) ]
                                          • 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: [Search Databases synchronously]Next Script: [Handle Result]
                                                  Script NameSearch Databases asynchronously
                                                  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

                                                                    Previous Script: [Search Databases asynchronously]Next Script: [Clear]
                                                                    Script NameHandle Result
                                                                    Run script with full access privilegesOff
                                                                    Include In MenuNo
                                                                    Layouts that use this script
                                                                      Scripts that use this script
                                                                        Script Definition
                                                                        Script Steps
                                                                        • #Initial gathering for search is done, so we display results:
                                                                        • Set Variable [ $query; Value:Get(ScriptParameter) ]
                                                                        • #Stop
                                                                        • Set Variable [ $r; Value:MBS( "MetaDataQuery.StopQuery"; $Query) ]
                                                                        • Delete All Records [ No dialog ]
                                                                        • #Put global result on top:
                                                                        • Set Variable [ $Count; Value:MBS( "MetaDataQuery.ResultCount"; $Query ) ]
                                                                        • Set Field [ Search::ResultCount; $Count ]
                                                                        • If [ $count > 0 ]
                                                                        • #And show records:
                                                                        • Set Variable [ $index; Value:0 ]
                                                                        • Loop
                                                                        • New Record/Request
                                                                        • Set Variable [ $path; Value:MBS( "MetaDataQuery.PathAtIndex"; $Query; $Index ) ]
                                                                        • Set Field [ Search::FilePath; $path ]
                                                                        • Commit Records/Requests [ No dialog ]
                                                                        • #next
                                                                        • Set Variable [ $index; Value:$index + 1 ]
                                                                        • Exit Loop If [ $index ≥ $count ]
                                                                        • End Loop
                                                                        • Set Variable [ $r; Value:MBS( "MetaDataQuery.Close"; $Query ) ]
                                                                        • 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: [Handle Result]
                                                                                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 [ Search::ResultCount; "" ]
                                                                                    • Set Field [ Search::All Results JSON; "" ]
                                                                                    • Delete All Records [ 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

                                                                                            Download example: Find FileMaker Databases

                                                                                            Used functions: