MBS FileMaker Plugin Example Databases

Trigger Script On New Record

All examples are included with download of MBS FileMaker Plugin.

Trigger Script On New Record.fmp12

Overview
Tables1
Relationships0
Layouts1
Scripts1
Value Lists0
Custom Functions0
Custom Menus31
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
Script Triggers
4 fields defined, 0 record
Script Triggers

Fields

Table Name: Script Triggers - 4 Fields
Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
FirstNameNormal, TextAuto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Repetitions: 1
  • Indexing: None
  • Automatically create indexes as needed
  • Index Language: English
        LastNameNormal, TextAuto-Enter:
        • Allow editing
        Validation:
        • Only during data entry
        Storage:
        • Repetitions: 1
        • Indexing: None
        • Automatically create indexes as needed
        • Index Language: English
              BirthDayNormal, TextAuto-Enter:
              • Allow editing
              Validation:
              • Only during data entry
              Storage:
              • Repetitions: 1
              • Indexing: None
              • Automatically create indexes as needed
              • Index Language: English
                    NewRecordTriggerNormal, TextAuto-Enter:
                    • Do not replace existing value for field (if any)
                    • Context table: Script Triggers
                      Calculation: MBS( "FM.RunScript" ; "Trigger Script On New Record.fp7"; "On New Record"; "NEW RECORD" ) /* This calculaion will only excute when a new record is created. It will call the script "On New Record" and pass it the Parameter "NEW RECORD" The "Do Not replace existing value of field (if any)" check box must be Checked" */
                    Validation:
                    • Only during data entry
                    Storage:
                    • Repetitions: 1
                    • Indexing: None
                    • Automatically create indexes as needed
                    • Index Language: English

                            Layout Objects: Script Triggers

                            Regular Fields

                            Field Name: Script Triggers::FirstName
                            Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                            • Top: 382 pt
                            • Left: 255 pt
                            • Bottom: 399 pt
                            • Right: 508 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: Script Triggers::LastName
                            Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                            • Top: 400 pt
                            • Left: 255 pt
                            • Bottom: 417 pt
                            • Right: 508 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: Script Triggers::BirthDay
                            Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                            • Top: 418 pt
                            • Left: 255 pt
                            • Bottom: 435 pt
                            • Right: 400 pt
                            • Anchoring: Left, Top
                            Field Format:
                            • Drop-down Calendar
                            • Include icon to show and hide calendar
                            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

                            On New Record

                            Script NameOn New Record
                            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: "Triggered on New Record"; Message: "This is the script parameter: " &Get(ScriptParameter); Default Button: “OK”, 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

                                              Download example: Trigger Script On New Record

                                              Used functions:




                                              Links
                                              MBS Xojo Plugins