MBS FileMaker Plugin Example Databases

Schedules

All examples are included with download of MBS FileMaker Plugin.

Schedules.fmp12

Overview
Tables2
Relationships0
Layouts2
Scripts5
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
OnFirstWindowOpenScript: Startup
OnLastWindowCloseOff
OnWindowOpenOff
OnWindowCloseOff
OnFileAVPlayerChangeOff
Thumbnail Settings
Generate ThumbnailsOn; Temporary

 

Tables

Table Name
Statistics
Occurrences in Relationship Graph
Schedules
10 fields defined, 0 record
Schedules
Test
1 field defined, 0 record
Test

Fields

Table Name: Schedules - 10 Fields
Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
IDNormal, TextAuto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Repetitions: 1
  • Indexing: None
  • Automatically create indexes as needed
  • Index Language: German
      TypeNormal, TextAuto-Enter:
      • Allow editing
      Validation:
      • Only during data entry
      Storage:
      • Repetitions: 1
      • Indexing: None
      • Automatically create indexes as needed
      • Index Language: German
          FileNameNormal, TextAuto-Enter:
          • Allow editing
          Validation:
          • Only during data entry
          Storage:
          • Repetitions: 1
          • Indexing: None
          • Automatically create indexes as needed
          • Index Language: German
              ScriptNameNormal, TextAuto-Enter:
              • Allow editing
              Validation:
              • Only during data entry
              Storage:
              • Repetitions: 1
              • Indexing: None
              • Automatically create indexes as needed
              • Index Language: German
                  ScriptParameterNormal, TextAuto-Enter:
                  • Allow editing
                  Validation:
                  • Only during data entry
                  Storage:
                  • Repetitions: 1
                  • Indexing: None
                  • Automatically create indexes as needed
                  • Index Language: German
                      SQLNormal, TextAuto-Enter:
                      • Allow editing
                      Validation:
                      • Only during data entry
                      Storage:
                      • Repetitions: 1
                      • Indexing: None
                      • Automatically create indexes as needed
                      • Index Language: German
                          EvaluateNormal, TextAuto-Enter:
                          • Allow editing
                          Validation:
                          • Only during data entry
                          Storage:
                          • Repetitions: 1
                          • Indexing: None
                          • Automatically create indexes as needed
                          • Index Language: German
                              repeatDelayNormal, NumberAuto-Enter:
                              • Allow editing
                              Validation:
                              • Only during data entry
                              Storage:
                              • Repetitions: 1
                              • Indexing: None
                              • Automatically create indexes as needed
                              • Index Language: German
                                  idleDelayNormal, NumberAuto-Enter:
                                  • Allow editing
                                  Validation:
                                  • Only during data entry
                                  Storage:
                                  • Repetitions: 1
                                  • Indexing: None
                                  • Automatically create indexes as needed
                                  • Index Language: German
                                      CounterNormal, NumberAuto-Enter:
                                      • Allow editing
                                      Validation:
                                      • Only during data entry
                                      Storage:
                                      • Global
                                      • Repetitions: 1
                                      • Index Language: German

                                          Table Name: Test - 1 Fields
                                          Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
                                          testNormal, TextAuto-Enter:
                                          • Allow editing
                                          Validation:
                                          • Only during data entry
                                          Storage:
                                          • Repetitions: 1
                                          • Indexing: None
                                          • Automatically create indexes as needed
                                          • Index Language: German

                                                Layout Objects: Schedules

                                                Regular Fields

                                                Field Name: Schedules::Type
                                                Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                • Top: 126 pt
                                                • Left: 96 pt
                                                • Bottom: 140 pt
                                                • Right: 169 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: Schedules::FileName
                                                Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                • Top: 126 pt
                                                • Left: 174 pt
                                                • Bottom: 140 pt
                                                • Right: 265 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: Schedules::ScriptName
                                                Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                • Top: 126 pt
                                                • Left: 270 pt
                                                • Bottom: 140 pt
                                                • Right: 373 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: Schedules::ScriptParameter
                                                Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                • Top: 126 pt
                                                • Left: 378 pt
                                                • Bottom: 140 pt
                                                • Right: 463 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: Schedules::SQL
                                                Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                • Top: 126 pt
                                                • Left: 468 pt
                                                • Bottom: 140 pt
                                                • Right: 631 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: Schedules::Evaluate
                                                Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                • Top: 126 pt
                                                • Left: 636 pt
                                                • Bottom: 140 pt
                                                • Right: 799 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: Schedules::repeatDelay
                                                Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                • Top: 126 pt
                                                • Left: 804 pt
                                                • Bottom: 140 pt
                                                • Right: 883 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: Schedules::idleDelay
                                                Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                • Top: 126 pt
                                                • Left: 888 pt
                                                • Bottom: 140 pt
                                                • Right: 967 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: Schedules::ID
                                                Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                • Top: 126 pt
                                                • Left: 6 pt
                                                • Bottom: 140 pt
                                                • Right: 91 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: Schedules::Counter
                                                Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                • Top: 12 pt
                                                • Left: 618 pt
                                                • Bottom: 26 pt
                                                • Right: 697 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

                                                Group Buttons

                                                Button PropertiesCoordinatesScript/Script Step
                                                  Type:
                                                • Text: Update List
                                                  Additional Properties:
                                                • Change to hand cursor over button
                                                • Rectangular
                                                • Top: 6 pt
                                                • Left: 6 pt
                                                • Bottom: 31 pt
                                                • Right: 109 pt
                                                • Anchoring: Left, Top
                                                Perform Script [ “UpdateList” ]

                                                Scripts:


                                                Button PropertiesCoordinatesScript/Script Step
                                                  Type:
                                                • Text: Remove This Schedule
                                                  Additional Properties:
                                                • Change to hand cursor over button
                                                • Rectangular
                                                • Top: 123 pt
                                                • Left: 984 pt
                                                • Bottom: 143 pt
                                                • Right: 1141 pt
                                                • Anchoring: Left, Top
                                                Perform Script [ “unschedule” ]

                                                Scripts:


                                                Button PropertiesCoordinatesScript/Script Step
                                                  Type:
                                                • Text: Schedule Script Call in 10 Seconds
                                                  Additional Properties:
                                                • Change to hand cursor over button
                                                • Rectangular
                                                • Top: 6 pt
                                                • Left: 123 pt
                                                • Bottom: 31 pt
                                                • Right: 322 pt
                                                • Anchoring: Left, Top
                                                Set Variable [ $r; Value:MBS( "Schedule.StartScriptAfterDelay"; 10; Get(FileName); "testScript"; "Hello World" ) & MBS( "FM.RunScript"; Get(FileName); "updateList") ]

                                                Button PropertiesCoordinatesScript/Script Step
                                                  Type:
                                                • Text: Schedule Script for Counting
                                                  Additional Properties:
                                                • Change to hand cursor over button
                                                • Rectangular
                                                • Top: 6 pt
                                                • Left: 333 pt
                                                • Bottom: 31 pt
                                                • Right: 514 pt
                                                • Anchoring: Left, Top
                                                Set Variable [ $r; Value:MBS( "Schedule.StartScriptAfterDelay"; 2; Get(FileName); "countScript"; ""; 2 ) & MBS( "FM.RunScript"; Get(FileName); "updateList") ]

                                                Button PropertiesCoordinatesScript/Script Step
                                                  Type:
                                                • Text: Schedule SQL for Counting
                                                  Additional Properties:
                                                • Change to hand cursor over button
                                                • Rectangular
                                                • Top: 42 pt
                                                • Left: 333 pt
                                                • Bottom: 67 pt
                                                • Right: 514 pt
                                                • Anchoring: Left, Top
                                                Set Variable [ $r; Value:MBS( "Schedule.ExecuteSQLAfterDelay"; 2; /* delay */ ""; /* file */ "UPDATE Schedules SET Counter = Counter + 1"; /* sql */ ""; /* fileName for script */ ""; /* scriptname */ ""; /* column separator */ ""; /* row separator */ 2 ) /* repeat after */ & MBS( "FM.RunScript"; Get(FileName); "updateList") ]

                                                Button PropertiesCoordinatesScript/Script Step
                                                  Type:
                                                • Text: Schedule Evaluate for Counting
                                                  Additional Properties:
                                                • Change to hand cursor over button
                                                • Rectangular
                                                • Top: 42 pt
                                                • Left: 123 pt
                                                • Bottom: 67 pt
                                                • Right: 304 pt
                                                • Anchoring: Left, Top
                                                Set Variable [ $r; Value:MBS( "Schedule.EvaluateAfterDelay"; 2; /* delay */ "MBS(\"FM.ExecuteSQL\"; \"UPDATE Schedules SET Counter = Counter + 1\")"; /* delay */ ""; /* fileName */ ""; /* scriptName */ 2 ) /* repeatDelay */ & MBS( "FM.RunScript"; Get(FileName); "updateList") ]

                                                Layout Objects: Test

                                                Regular Fields

                                                Field Name: Test::test
                                                Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                • Top: 24 pt
                                                • Left: 138 pt
                                                • Bottom: 38 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

                                                Script Hierarchy

                                                UpdateList
                                                Startup
                                                testScript
                                                countScript
                                                unschedule

                                                Next Script: [Startup]
                                                Script NameUpdateList
                                                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 ]
                                                  • #get list of schedules
                                                  • Set Variable [ $list; Value:MBS("Schedule.List"; 0) ]
                                                  • #now walk over list
                                                  • Set Variable [ $count; Value:ValueCount($list) ]
                                                  • Set Variable [ $index; Value:0 ]
                                                  • Loop
                                                  • Set Variable [ $index; Value:$index + 1 ]
                                                  • Set Variable [ $line; Value:GetValue($list; $index) ]
                                                  • If [ Length($line) > 5 ]
                                                  • Set Variable [ $line; Value:Substitute($line; " "; ¶) ]
                                                  • #process line
                                                  • New Record/Request
                                                  • Set Field [ Schedules::ID; GetValue($line; 1) ]
                                                  • Set Field [ Schedules::Type; GetValue($line; 2) ]
                                                  • Set Field [ Schedules::FileName; GetValue($line; 3) ]
                                                  • Set Field [ Schedules::ScriptName; GetValue($line; 4) ]
                                                  • Set Field [ Schedules::ScriptParameter; GetValue($line; 5) ]
                                                  • Set Field [ Schedules::SQL; GetValue($line; 6) ]
                                                  • Set Field [ Schedules::Evaluate; GetValue($line; 7) ]
                                                  • Set Field [ Schedules::repeatDelay; GetValue($line; 8) ]
                                                  • Set Field [ Schedules::idleDelay; GetValue($line; 9) ]
                                                  • Commit Records/Requests [ Skip data entry validation; No dialog ]
                                                  • End If
                                                  • #next
                                                  • Exit Loop If [ $index >= $count ]
                                                  • End Loop
                                                  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: [UpdateList]Next Script: [testScript]
                                                          Script NameStartup
                                                          Run script with full access privilegesOff
                                                          Include In MenuNo
                                                          Layouts that use this script
                                                            Scripts that use this script
                                                              Script Definition
                                                              Script Steps
                                                              • Set Variable [ $r; Value:MBS("Trace") ]
                                                              • 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

                                                                            Previous Script: [Startup]Next Script: [countScript]
                                                                            Script NametestScript
                                                                            Run script with full access privilegesOff
                                                                            Include In MenuYes
                                                                            Layouts that use this script
                                                                              Scripts that use this script
                                                                                Script Definition
                                                                                Script Steps
                                                                                • Show Custom Dialog [ Title: "Script called"; Message: Get(ScriptParameter); Default Button: “OK”, Commit: “Yes”; Button 2: “Cancel”, Commit: “No” ]
                                                                                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: [testScript]Next Script: [unschedule]
                                                                                              Script NamecountScript
                                                                                              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 [ Schedules::Counter; Schedules::Counter + 1 ]
                                                                                                  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: [countScript]
                                                                                                          Script Nameunschedule
                                                                                                          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 [ $r; Value:MBS("schedule.release"; Schedules::ID) ]
                                                                                                            • Delete Record/Request [ 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: Schedules

                                                                                                                    Used functions:




                                                                                                                    Links
                                                                                                                    MBS FileMaker Plugins