MBS FileMaker Plugin Example Databases

FSEvents

All examples are included with download of MBS FileMaker Plugin.

FSEvents.fmp12

Overview
Tables1
Relationships0
Layouts1
Scripts4
Value Lists0
Custom Functions0
Custom Menus33
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
OnLastWindowCloseScript: Shutdown
OnWindowOpenOff
OnWindowCloseOff
OnFileAVPlayerChangeOff
Thumbnail Settings
Generate ThumbnailsOn; Temporary

 

Tables

Table Name
Statistics
Occurrences in Relationship Graph
FSEvents
6 fields defined, 0 record
FSEvents

Fields

Table Name: FSEvents - 6 Fields
Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
PathNormal, TextAuto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Repetitions: 1
  • Indexing: None
  • Automatically create indexes as needed
  • Index Language: German
      FlagsNormal, TextAuto-Enter:
      • Allow editing
      Validation:
      • Only during data entry
      Storage:
      • Repetitions: 1
      • Indexing: None
      • Automatically create indexes as needed
      • Index Language: German
          IDNormal, TextAuto-Enter:
          • Allow editing
          Validation:
          • Only during data entry
          Storage:
          • Repetitions: 1
          • Indexing: None
          • Automatically create indexes as needed
          • Index Language: German
              LastIDNormal, TextAuto-Enter:
              • Allow editing
              Validation:
              • Only during data entry
              Storage:
              • Global
              • Repetitions: 1
              • Index Language: German
                  StreamRefNormal, TextAuto-Enter:
                  • Allow editing
                  Validation:
                  • Only during data entry
                  Storage:
                  • Global
                  • Repetitions: 1
                  • Index Language: German
                      TimeNormal, TimestampAuto-Enter:
                      • Creation timestamp
                      • Allow editing
                      Validation:
                      • Only during data entry
                      Storage:
                      • Repetitions: 1
                      • Indexing: None
                      • Automatically create indexes as needed
                      • Index Language: German

                            Layout Objects: FSEvents

                            Regular Fields

                            Field Name: FSEvents::Path
                            Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                            • Top: 60 pt
                            • Left: 54 pt
                            • Bottom: 74 pt
                            • Right: 589 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: FSEvents::Flags
                            Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                            • Top: 78 pt
                            • Left: 54 pt
                            • Bottom: 92 pt
                            • Right: 307 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: FSEvents::ID
                            Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                            • Top: 78 pt
                            • Left: 336 pt
                            • Bottom: 92 pt
                            • Right: 589 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: FSEvents::LastID
                            Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                            • Top: 12 pt
                            • Left: 270 pt
                            • Bottom: 26 pt
                            • Right: 523 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: FSEvents::StreamRef
                            Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                            • Top: 30 pt
                            • Left: 270 pt
                            • Bottom: 44 pt
                            • Right: 523 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: FSEvents::Time
                            Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                            • Top: 60 pt
                            • Left: 636 pt
                            • Bottom: 74 pt
                            • Right: 877 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

                            Group Buttons

                            Button PropertiesCoordinatesScript/Script Step
                              Type:
                            • Text: Initialize and watch Desktop
                              Additional Properties:
                            • Change to hand cursor over button
                            • Rectangular
                            • Top: 12 pt
                            • Left: 18 pt
                            • Bottom: 38 pt
                            • Right: 199 pt
                            • Anchoring: Left, Top
                            Perform Script [ “Init” ]

                            Scripts:


                            Script Hierarchy

                            Init
                            FSEventsNotification
                            Shutdown
                            Clear

                            Next Script: [FSEventsNotification]
                            Script NameInit
                            Run script with full access privilegesOff
                            Include In MenuYes
                            Layouts that use this script
                            Scripts that use this script
                              Script Definition
                              Script Steps
                              • Delete All Records [ No dialog ]
                              • Set Variable [ $path; Value:MBS( "Folders.UserDesktop" ) ]
                              • Set Variable [ $sinceWhen; Value:"now" ]
                              • If [ not IsEmpty(FSEvents::LastID) ]
                              • Set Variable [ $sinceWhen; Value:FSEvents::LastID ]
                              • End If
                              • Set Variable [ $fstream; Value:MBS("FSEvents.Create"; $path; $sinceWhen; "IgnoreSelf, FileEvents, WatchRoot"; 2) ]
                              • If [ MBS("IsError") ]
                              • Show Custom Dialog [ Title: "Error"; Message: "Failed to create file system event monitor."; Default Button: “OK”, Commit: “Yes”; Button 2: “Cancel”, Commit: “No” ]
                              • Else
                              • Set Variable [ $r; Value:MBS("FSEvents.SetFilename"; $fstream; Get(FileName)) ]
                              • Set Variable [ $r; Value:MBS("FSEvents.SetScriptName"; $fstream; "FSEventsNotification") ]
                              • Set Variable [ $r; Value:MBS("FSEvents.Start"; $fstream) ]
                              • If [ $r = 1 ]
                              • Set Field [ FSEvents::StreamRef; $fstream ]
                              • Else
                              • Show Custom Dialog [ Title: "Error"; Message: "Failed to start file system event monitor."; Default Button: “OK”, Commit: “Yes”; Button 2: “Cancel”, Commit: “No” ]
                              • Set Variable [ $r; Value:MBS("FSEvents.Release"; $fstream) ]
                              • End If
                              • 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: [Init]Next Script: [Shutdown]
                                      Script NameFSEventsNotification
                                      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 [ $stream; Value:Get(ScriptParameter) ]
                                          • Loop
                                          • Exit Loop If [ MBS("FSEvents.HasNextEvent"; $stream) ≠ 1 ]
                                          • Set Variable [ $e; Value:MBS("FSEvents.NextEvent"; $stream) ]
                                          • Set Variable [ $path; Value:GetValue($e; 1) ]
                                          • Set Variable [ $id; Value:GetValue($e; 2) ]
                                          • Set Variable [ $flagsNumber; Value:GetValue($e; 3) ]
                                          • Set Variable [ $flagsText; Value:GetValue($e; 4) ]
                                          • New Record/Request
                                          • Set Field [ FSEvents::Path; $path ]
                                          • Set Field [ FSEvents::Flags; $flagsText ]
                                          • Set Field [ FSEvents::ID; $id ]
                                          • Commit Records/Requests [ Skip data entry validation; No dialog ]
                                          • End Loop
                                          • If [ not IsEmpty($id) ]
                                          • Set Field [ FSEvents::LastID; $id ]
                                          • 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: [FSEventsNotification]Next Script: [Clear]
                                                  Script NameShutdown
                                                  Run script with full access privilegesOff
                                                  Include In MenuYes
                                                  Layouts that use this script
                                                    Scripts that use this script
                                                      Script Definition
                                                      Script Steps
                                                      • If [ IsEmpty(FSEvents::StreamRef) ]
                                                      • #nothing to do
                                                      • Else
                                                      • #cleanup
                                                      • Set Variable [ $r; Value:MBS("FSEvents.Release"; FSEvents::StreamRef) ]
                                                      • Set Field [ FSEvents::StreamRef; "" ]
                                                      • 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: [Shutdown]
                                                              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
                                                                  • Delete All Records [ No dialog ]
                                                                  • Set Field [ FSEvents::LastID; "" ]
                                                                  • Set Field [ FSEvents::StreamRef; "" ]
                                                                  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: FSEvents

                                                                          Used functions:




                                                                          Links
                                                                          MBS FileMaker blog