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

MBS FileMaker Plugin Example Databases

Trigger Script On Field Exit

All examples are included with download of MBS FileMaker Plugin.

Trigger Script On Field Exit.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
3 fields defined, 1 record
Script Triggers

Fields

Table Name: Script Triggers - 3 Fields
Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
FirstNameNormal, TextAuto-Enter:
  • Allow editing
  • Context table: Script Triggers
    Calculation: Let( [ x = Case( Get ( RecordModificationCount ) < 1 and IsEmpty(Script Triggers::FirstName); ""; /* Do Nothing */ MBS( "FM.RunScript" ; "Trigger Script On Field Exit.fp7"; "On Field Exit"; Script Triggers::FirstName ) ) ]; Script Triggers::FirstName ) /* Using the "let" statement here makes it easy to call the MBS script trigger function without having the result of the function interfere with the overall result of the Function, which we need to be just "FirstName" We use a Case statement here to ensure that the script runs only when the "FirstName" is edited. If we don't use the Case statement the script will also be called on New Record */
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

                    Layout Objects: Script Triggers

                    Regular Fields

                    Field Name: Script Triggers::FirstName
                    Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                    • Top: 446 pt
                    • Left: 220 pt
                    • Bottom: 463 pt
                    • Right: 473 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: 464 pt
                    • Left: 220 pt
                    • Bottom: 481 pt
                    • Right: 473 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: 482 pt
                    • Left: 220 pt
                    • Bottom: 499 pt
                    • Right: 365 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

                    Group Buttons

                    Button PropertiesCoordinatesScript/Script Step
                      Type:
                    • Text: To See how this works open "Define Fields" and examine the field "FirstName".
                      Additional Properties:
                    • Change to hand cursor over button
                    • Rectangular
                    • Top: 526 pt
                    • Left: 88 pt
                    • Bottom: 555 pt
                    • Right: 638 pt
                    • Anchoring: Left, Top
                    Open Manage Database

                    Script Hierarchy

                    On Field Exit

                    Script NameOn Field Exit
                    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 Exit Field"; Message: "This is the script parameter: " &Get(ScriptParameter); Default Button: “OK”, Commit: “Yes” ]
                        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 Field Exit

                                      Used functions: