MBS FileMaker Plugin Example Databases

Search Applications

All examples are included with download of MBS FileMaker Plugin.

Search Applications.fmp12

Overview
Tables1
Relationships0
Layouts1
Scripts5
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 Applications
6 fields defined, 0 record
Search Applications

Fields

Table Name: Search Applications - 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 Applications

                          Regular Fields

                          Field Name: Search Applications::Name
                          Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                          • Top: 88 pt
                          • Left: 74 pt
                          • Bottom: 109 pt
                          • Right: 327 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 Applications::FilePath
                          Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                          • Top: 112 pt
                          • Left: 74 pt
                          • Bottom: 134 pt
                          • Right: 502 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 Applications::Icon
                          Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                          • Top: 88 pt
                          • Left: 7 pt
                          • Bottom: 145 pt
                          • Right: 64 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

                          Field Name: Search Applications::Attributes JSON
                          Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                          • Top: 88 pt
                          • Left: 510 pt
                          • Bottom: 145 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: Search Applications::All Results JSON
                          Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                          • Top: 2 pt
                          • Left: 337 pt
                          • Bottom: 45 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
                          No

                          Field Name: Search Applications::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: Search Applications
                          • Top: 10 pt
                          • Left: 9 pt
                          • Bottom: 45 pt
                          • Right: 149 pt
                          • Anchoring: Left, Top
                          Perform Script [ “Search Applications synchronously with Progress Dialog” ]

                          Scripts:


                          Script Hierarchy

                          Search Applications synchronously with Progress Dialog
                          Search Applications synchronously
                          Search Applications asynchronously
                          Handle Result
                          Clear

                          Next Script: [Search Applications synchronously]
                          Script NameSearch Applications synchronously with Progress Dialog
                          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 Applications synchronously with Progress Dialog]Next Script: [Search Applications asynchronously]
                                    Script NameSearch Applications 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; "kMDItemContentType=\"com.apple.application-bundle\"") ]
                                        • 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 Field [ Search Applications::All Results JSON; MBS( "MetaDataQuery.Results"; $Query ) ]
                                        • Set Variable [ $Count; Value:MBS( "MetaDataQuery.ResultCount"; $Query ) ]
                                        • Set Field [ Search Applications::ResultCount; $Count ]
                                        • #And show records:
                                        • Set Variable [ $index; Value:0 ]
                                        • Loop
                                        • New Record/Request
                                        • Set Variable [ $path; Value:MBS( "MetaDataQuery.PathAtIndex"; $Query; $Index ) ]
                                        • Set Variable [ $result; Value:MBS( "MetaDataQuery.ResultAtIndex"; $Query; $Index ) ]
                                        • Set Field [ Search Applications::Name; MBS( "Files.FileDisplayName"; $Path ) ]
                                        • Set Field [ Search Applications::FilePath; $path ]
                                        • Set Field [ Search Applications::Attributes JSON; $result ]
                                        • Set Field [ Search Applications::Icon; MBS( "Icon.GetIcon"; $Path; 128 ) ]
                                        • Commit Records/Requests [ No dialog ]
                                        • #next
                                        • Set Variable [ $index; Value:$index + 1 ]
                                        • Exit Loop If [ $index ≥ $count ]
                                        • #Lets exit when we have 100 items
                                        • Exit Loop If [ $index > 100 ]
                                        • End Loop
                                        • Set Variable [ $r; Value:MBS( "MetaDataQuery.Close"; $Query ) ]
                                        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 Applications synchronously]Next Script: [Handle Result]
                                                Script NameSearch Applications 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 Applications 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 Field [ Search Applications::All Results JSON; MBS( "MetaDataQuery.Results"; $Query ) ]
                                                                      • Set Variable [ $Count; Value:MBS( "MetaDataQuery.ResultCount"; $Query ) ]
                                                                      • Set Field [ Search Applications::ResultCount; $Count ]
                                                                      • #And show records:
                                                                      • Set Variable [ $index; Value:0 ]
                                                                      • Loop
                                                                      • New Record/Request
                                                                      • Set Variable [ $path; Value:MBS( "MetaDataQuery.PathAtIndex"; $Query; $Index ) ]
                                                                      • Set Variable [ $result; Value:MBS( "MetaDataQuery.ResultAtIndex"; $Query; $Index ) ]
                                                                      • Set Field [ Search Applications::Name; MBS( "Files.FileDisplayName"; $Path ) ]
                                                                      • Set Field [ Search Applications::FilePath; $path ]
                                                                      • Set Field [ Search Applications::Attributes JSON; $result ]
                                                                      • Set Field [ Search Applications::Icon; MBS( "Icon.GetIcon"; $Path; 128 ) ]
                                                                      • Commit Records/Requests [ No dialog ]
                                                                      • #next
                                                                      • Set Variable [ $index; Value:$index + 1 ]
                                                                      • Exit Loop If [ $index ≥ $count ]
                                                                      • #Lets exit when we have 100 items
                                                                      • Exit Loop If [ $index > 100 ]
                                                                      • End Loop
                                                                      • Set Variable [ $r; Value:MBS( "MetaDataQuery.Close"; $Query ) ]
                                                                      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 Applications::ResultCount; "" ]
                                                                                  • Set Field [ Search Applications::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: Search Applications

                                                                                          Used functions:




                                                                                          Links
                                                                                          MBS Xojo PDF Plugins