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

MBS FileMaker Plugin Example Databases

Schedule Moved Trigger

All examples are included with download of MBS FileMaker Plugin.

Schedule Moved Trigger.fmp12

Overview
Tables1
Relationships0
Layouts1
Scripts3
Value Lists0
Custom Functions0
Custom Menus24
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
Schedule Moved Trigger
7 fields defined, 1 record
Schedule Moved Trigger

Fields

Table Name: Schedule Moved Trigger - 7 Fields
Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
PrimärschlüsselNormal, TextAuto-Enter: Validation:
  • Only during data entry
  • Not empty
  • Unique
  • Strict validation
Storage:
  • Repetitions: 1
  • Indexing: Minimal
  • Automatically create indexes as needed
  • Index Language: Unicode Raw
Eindeutige ID für jeden Datensatz in dieser Tabelle
          ErstellungszeitstempelNormal, TimestampAuto-Enter:
          • Creation timestamp
          Validation:
          • Only during data entry
          • Strict data type: 4 digit year
          • Not empty
          • Strict validation
          Storage:
          • Repetitions: 1
          • Indexing: None
          • Automatically create indexes as needed
          • Index Language: German
          Datum und Uhrzeit der Erstellung der einzelnen Datensätze
                  ErstelltVonNormal, TextAuto-Enter:
                  • Creation account name
                  Validation:
                  • Only during data entry
                  • Not empty
                  • Strict validation
                  Storage:
                  • Repetitions: 1
                  • Indexing: None
                  • Automatically create indexes as needed
                  • Index Language: German
                  Kontoname des Benutzers, der die einzelnen Datensätze erstellt hat
                          ÄnderungszeitstempelNormal, TimestampAuto-Enter:
                          • Modification timestamp
                          Validation:
                          • Only during data entry
                          • Strict data type: 4 digit year
                          • Not empty
                          • Strict validation
                          Storage:
                          • Repetitions: 1
                          • Indexing: None
                          • Automatically create indexes as needed
                          • Index Language: German
                          Datum und Uhrzeit der letzten Änderung der einzelnen Datensätze
                                  GeändertVonNormal, TextAuto-Enter:
                                  • Modification account name
                                  Validation:
                                  • Only during data entry
                                  • Not empty
                                  • Strict validation
                                  Storage:
                                  • Repetitions: 1
                                  • Indexing: None
                                  • Automatically create indexes as needed
                                  • Index Language: German
                                  Kontoname des Benutzers, der die einzelnen Datensätze zuletzt geändert hat
                                          Last MoveNormal, TimestampAuto-Enter:
                                          • Allow editing
                                          Validation:
                                          • Only during data entry
                                          Storage:
                                          • Repetitions: 1
                                          • Indexing: None
                                          • Automatically create indexes as needed
                                          • Index Language: German
                                              Last Move MillisecondsNormal, TextAuto-Enter:
                                              • Allow editing
                                              Validation:
                                              • Only during data entry
                                              Storage:
                                              • Repetitions: 1
                                              • Indexing: None
                                              • Automatically create indexes as needed
                                              • Index Language: German

                                                  Layout Objects: Schedule Moved Trigger

                                                  Regular Fields

                                                  Field Name: Schedule Moved Trigger::Last Move
                                                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                  • Top: 122 pt
                                                  • Left: 212 pt
                                                  • Bottom: 153 pt
                                                  • Right: 521 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: Schedule Moved Trigger::Last Move Milliseconds
                                                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                  • Top: 157 pt
                                                  • Left: 212 pt
                                                  • Bottom: 188 pt
                                                  • Right: 521 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

                                                  Script Hierarchy

                                                  Start Moved Trigger
                                                  Stop Moved
                                                  Moved

                                                  Next Script: [Stop Moved]
                                                  Script NameStart Moved Trigger
                                                  Run script with full access privilegesOff
                                                  Include In MenuYes
                                                  Layouts that use this script
                                                    Scripts that use this script
                                                      Script Definition
                                                      Script Steps
                                                      • #remove it if you called script before
                                                      • If [ Length ( $$MovedSchedule ) > 0 ]
                                                      • Set Variable [ $r; Value:MBS("Schedule.Release"; $$MovedSchedule) ]
                                                      • Set Variable [ $$MovedSchedule; Value:"" ]
                                                      • End If
                                                      • #our settings
                                                      • Set Variable [ $ScriptParameter; Value:"" ]
                                                      • Set Variable [ $ScriptName; Value:"Moved" ]
                                                      • Set Variable [ $FileName; Value:Get(FileName) ]
                                                      • #now build it
                                                      • Set Variable [ $currentWindow; Value:MBS( "Window.Current" ) ]
                                                      • Set Variable [ $WindowPos; Value:MBS( "Window.GetLeft"; $currentWindow ) & "/" & MBS( "Window.GetTop"; $currentWindow ) ]
                                                      • #we store the position in the window tag right with the plugin
                                                      • Set Variable [ $r; Value:MBS( "Window.SetTag"; $currentWindow; $WindowPos ) ]
                                                      • #init schedule
                                                      • Set Variable [ $ScheduleRef; Value:MBS( "Schedule.EvaluateAfterDelay"; 1 /* every second */; "1" /* dummy expression */; ""; ""; 1 /* repeat after every second */ ) ]
                                                      • Set Variable [ $expression; Value:"Let ( [ currentWindow = $$$currentWindow; scheduleRef = $$$scheduleRef; FileName = $$$FileName; ScriptName = $$$ScriptName; ScriptParameter = $$$ScriptParameter; oldWindowPos = MBS( \"Window.GetTag\"; currentWindow ); closed = MBS(\"IsError\"); newWindowPos = MBS( \"Window.GetLeft\"; currentWindow ) & \"/\" & MBS( \"Window.GetTop\"; currentWindow ); r = If(oldWindowPos ≠ newWindowPos; MBS( \"Window.SetTag\"; currentWindow; newWindowPos ) & MBS( \"FM.RunScript\"; FileName; ScriptName; ScriptParameter ); 0); r = If(closed; MBS( \"Schedule.Release\"; scheduleRef ); 0) ]; \"\")" ]
                                                      • Set Variable [ $expression; Value:Substitute($expression; "$$$ScriptParameter"; Quote($ScriptParameter)) ]
                                                      • Set Variable [ $expression; Value:Substitute($expression; "$$$FileName"; Quote($FileName)) ]
                                                      • Set Variable [ $expression; Value:Substitute($expression; "$$$ScriptName"; Quote($ScriptName)) ]
                                                      • Set Variable [ $expression; Value:Substitute($expression; "$$$scheduleRef"; $scheduleRef) ]
                                                      • Set Variable [ $expression; Value:Substitute($expression; "$$$currentWindow"; $currentWindow) ]
                                                      • Set Variable [ $r; Value:MBS( "Schedule.SetEvaluate"; $ScheduleRef; $Expression ) ]
                                                      • Set Variable [ $$MovedSchedule; Value:$ScheduleRef ]
                                                      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: [Start Moved Trigger]Next Script: [Moved]
                                                                    Script NameStop Moved
                                                                    Run script with full access privilegesOff
                                                                    Include In MenuYes
                                                                    Layouts that use this script
                                                                      Scripts that use this script
                                                                        Script Definition
                                                                        Script Steps
                                                                        • If [ Length ( $$MovedSchedule ) > 0 ]
                                                                        • Set Variable [ $r; Value:MBS("Schedule.Release"; $$MovedSchedule) ]
                                                                        • Set Variable [ $$MovedSchedule; Value:"" ]
                                                                        • 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: [Stop Moved]
                                                                                      Script NameMoved
                                                                                      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 [ Schedule Moved Trigger::Last Move Milliseconds; Get(CurrentTimeUTCMilliseconds) ]
                                                                                          • Set Field [ Schedule Moved Trigger::Last Move; Get(CurrentTimestamp) ]
                                                                                          • Commit Records/Requests [ 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: Schedule Moved Trigger

                                                                                                  Used functions: