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

MBS FileMaker Plugin Example Databases

OnRecordEdit Trigger

All examples are included with download of MBS FileMaker Plugin.

OnRecordEdit Trigger.fmp12

Overview
Tables2
Relationships0
Layouts2
Scripts6
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
OnRecordEdit Trigger
8 fields defined, 4 records
OnRecordEdit Trigger
Status
6 fields defined, 0 record
Status

Fields

Table Name: OnRecordEdit Trigger - 8 Fields
Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
PrimaryKeyNormal, 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
Unique identifier of each record in this table
          CreationTimestampNormal, 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
          Date and time each record was created
                  CreatedByNormal, 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
                  Account name of the user who created each record
                          ModificationTimestampNormal, 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
                          Date and time each record was last modified
                                  ModifiedByNormal, 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
                                  Account name of the user who last modified each record
                                          FirstNameNormal, TextAuto-Enter:
                                          • Allow editing
                                          Validation:
                                          • Only during data entry
                                          Storage:
                                          • Repetitions: 1
                                          • Indexing: None
                                          • Automatically create indexes as needed
                                          • Index Language: German
                                                LastNameNormal, TextAuto-Enter:
                                                • Allow editing
                                                Validation:
                                                • Only during data entry
                                                Storage:
                                                • Repetitions: 1
                                                • Indexing: None
                                                • Automatically create indexes as needed
                                                • Index Language: German
                                                      CityNormal, TextAuto-Enter:
                                                      • Allow editing
                                                      Validation:
                                                      • Only during data entry
                                                      Storage:
                                                      • Repetitions: 1
                                                      • Indexing: None
                                                      • Automatically create indexes as needed
                                                      • Index Language: German

                                                            Table Name: Status - 6 Fields
                                                            Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
                                                            PrimärschlüsselNormal, TextAuto-Enter:
                                                            • Context table: Status
                                                              Calculation: Get( UUID )
                                                            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
                                                                                                    StatusNormal, TextAuto-Enter:
                                                                                                    • Allow editing
                                                                                                    Validation:
                                                                                                    • Only during data entry
                                                                                                    Storage:
                                                                                                    • Global
                                                                                                    • Repetitions: 1
                                                                                                    • Index Language: German

                                                                                                        Layout Objects: OnRecordEdit Trigger

                                                                                                        Regular Fields

                                                                                                        Field Name: OnRecordEdit Trigger::FirstName
                                                                                                        Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                                                        • Top: 114 pt
                                                                                                        • Left: 138 pt
                                                                                                        • Bottom: 145 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: Default for Data Type
                                                                                                        • Go to next field using: Tab key
                                                                                                        Yes

                                                                                                        Field Name: OnRecordEdit Trigger::LastName
                                                                                                        Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                                                        • Top: 149 pt
                                                                                                        • Left: 138 pt
                                                                                                        • Bottom: 180 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: Default for Data Type
                                                                                                        • Go to next field using: Tab key
                                                                                                        Yes

                                                                                                        Field Name: OnRecordEdit Trigger::City
                                                                                                        Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                                                        • Top: 184 pt
                                                                                                        • Left: 138 pt
                                                                                                        • Bottom: 215 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: Default for Data Type
                                                                                                        • Go to next field using: Tab key
                                                                                                        Yes

                                                                                                        Field Name: Status::Status
                                                                                                        Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                                                        • Top: 33 pt
                                                                                                        • Left: 502 pt
                                                                                                        • Bottom: 64 pt
                                                                                                        • Right: 755 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

                                                                                                        Layout Objects: Status

                                                                                                        Regular Fields

                                                                                                        Field Name: Status::Status
                                                                                                        Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                                                        • Top: 114 pt
                                                                                                        • Left: 138 pt
                                                                                                        • Bottom: 145 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: Default for Data Type
                                                                                                        • Go to next field using: Tab key
                                                                                                        No

                                                                                                        Script Hierarchy

                                                                                                        OnRecordLoad
                                                                                                        OnRecordCommit
                                                                                                        OnRecordEdit
                                                                                                        OnRecordRevert
                                                                                                        Clear Timer
                                                                                                        Trace on

                                                                                                        Next Script: [OnRecordCommit]
                                                                                                        Script NameOnRecordLoad
                                                                                                        Run script with full access privilegesOff
                                                                                                        Include In MenuYes
                                                                                                        Layouts that use this script
                                                                                                          Scripts that use this script
                                                                                                            Script Definition
                                                                                                            Script Steps
                                                                                                            • If [ Get(RecordOpenState) = 1 ]
                                                                                                            • Set Field [ Status::Status; "New" ]
                                                                                                            • Else
                                                                                                            • Set Field [ Status::Status; "Loaded" ]
                                                                                                            • End If
                                                                                                            • Perform Script [ “Clear Timer” ]
                                                                                                            • // Set Variable [ $Expression; Value:If(Get ( RecordOpenState ) = 2; Let([r = MBS( "Schedule.Release"; $$timer ); $$timer = ""; r = MBS( "FM.RunScript"; Get(FileName); "OnRecordEdit" )];1)) ]
                                                                                                            • Set Variable [ $Expression; Value:"If(Get ( RecordOpenState ) = 2; Let([r = MBS( \"Schedule.Release\"; $$timer ); $$timer = \"\"; r = MBS( \"FM.RunScript\"; Get(FileName); \"OnRecordEdit\" )];1))" ]
                                                                                                            • Set Variable [ $r; Value:MBS( "Schedule.EvaluateAfterDelay"; 1; $Expression; ""; ""; 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: [OnRecordLoad]Next Script: [OnRecordEdit]
                                                                                                                  Script NameOnRecordCommit
                                                                                                                  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 [ Status::Status; "Saved" ]
                                                                                                                      • Perform Script [ “Clear Timer” ]
                                                                                                                      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: [OnRecordCommit]Next Script: [OnRecordRevert]
                                                                                                                            Script NameOnRecordEdit
                                                                                                                            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 [ Status::Status; "Edit" ]
                                                                                                                                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: [OnRecordEdit]Next Script: [Clear Timer]
                                                                                                                                        Script NameOnRecordRevert
                                                                                                                                        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 [ Status::Status; "Revert" ]
                                                                                                                                            • Perform Script [ “Clear Timer” ]
                                                                                                                                            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: [OnRecordRevert]Next Script: [Trace on]
                                                                                                                                                  Script NameClear Timer
                                                                                                                                                  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($$timer) > 0 ]
                                                                                                                                                    • Set Variable [ $r; Value:MBS( "Schedule.Release"; $$timer ) ]
                                                                                                                                                    • Set Variable [ $$timer; 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: [Clear Timer]
                                                                                                                                                                  Script NameTrace on
                                                                                                                                                                  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("Trace") ]
                                                                                                                                                                      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: OnRecordEdit Trigger

                                                                                                                                                                                    Used functions: