MBS FileMaker Plugin Example Databases

JavaScript libPhoneNumber

All examples are included with download of MBS FileMaker Plugin.

JavaScript libPhoneNumber.fmp12

Overview
Tables1
Relationships0
Layouts1
Scripts3
Value Lists0
Custom Functions0
Custom Menus0
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: Start Script
OnLastWindowCloseScript: End Script
OnWindowOpenOff
OnWindowCloseOff
OnFileAVPlayerChangeOff
Thumbnail Settings
Generate ThumbnailsOn; Temporary

 

Tables

Table Name
Statistics
Occurrences in Relationship Graph
JavaScript
9 fields defined, 10 records
JavaScript

Fields

Table Name: JavaScript - 9 Fields
Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
PrimaryKeyNormal, TextAuto-Enter:
  • Context table: JavaScript
    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
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
                                          JavaScriptNormal, TextAuto-Enter:
                                          • Allow editing
                                          Validation:
                                          • Only during data entry
                                          Storage:
                                          • Repetitions: 1
                                          • Indexing: None
                                          • Automatically create indexes as needed
                                          • Index Language: German
                                              OutputNormal, TextAuto-Enter:
                                              • Allow editing
                                              Validation:
                                              • Only during data entry
                                              Storage:
                                              • Repetitions: 1
                                              • Indexing: None
                                              • Automatically create indexes as needed
                                              • Index Language: German
                                                  CommentNormal, TextAuto-Enter:
                                                  • Allow editing
                                                  Validation:
                                                  • Only during data entry
                                                  Storage:
                                                  • Repetitions: 1
                                                  • Indexing: Minimal
                                                  • Automatically create indexes as needed
                                                  • Index Language: German
                                                        LibPhoneNumberNormal, TextAuto-Enter:
                                                        • Allow editing
                                                        Validation:
                                                        • Only during data entry
                                                        Storage:
                                                        • Global
                                                        • Repetitions: 1
                                                        • Index Language: German

                                                            Layout Objects: JavaScript

                                                            Regular Fields

                                                            Field Name: JavaScript::JavaScript
                                                            Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                            • Top: 52 pt
                                                            • Left: 138 pt
                                                            • Bottom: 302 pt
                                                            • Right: 747 pt
                                                            • Anchoring: Left, Top
                                                            Field Format:
                                                            • Edit Box
                                                            Field Behavior:
                                                            • Allow field to be entered: In Find mode, In Browse mode
                                                            • Disable visual spell-checking
                                                            • Touch keyboard type: Default for Data Type
                                                            • Go to next field using: Tab key
                                                            Yes

                                                            Field Name: JavaScript::Output
                                                            Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                            • Top: 311 pt
                                                            • Left: 138 pt
                                                            • Bottom: 525 pt
                                                            • Right: 747 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: JavaScript::Comment
                                                            Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                            • Top: 111 pt
                                                            • Left: 758 pt
                                                            • Bottom: 525 pt
                                                            • Right: 1011 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: JavaScript::LibPhoneNumber
                                                            Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                            • Top: 562 pt
                                                            • Left: 537 pt
                                                            • Bottom: 583 pt
                                                            • Right: 960 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

                                                            Buttons

                                                            Button PropertiesCoordinatesScript/Script Step
                                                              Type:
                                                            • Text: Run JavaScript
                                                            • Top: 58 pt
                                                            • Left: 757 pt
                                                            • Bottom: 92 pt
                                                            • Right: 942 pt
                                                            • Anchoring: Left, Top
                                                            Perform Script [ “Run JavaScript” ]

                                                            Scripts:


                                                            Script Hierarchy

                                                            Run JavaScript
                                                            Start Script
                                                            End Script

                                                            Next Script: [Start Script]
                                                            Script NameRun JavaScript
                                                            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( "JS.EvaluateToString"; $$JS; JavaScript::JavaScript ) ]
                                                              • Set Field [ JavaScript::Output; $r ]
                                                              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: [Run JavaScript]Next Script: [End Script]
                                                                      Script NameStart Script
                                                                      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 [ $$JS; Value:MBS("JS.New") ]
                                                                          • If [ MBS("IsError") ]
                                                                          • Show Custom Dialog [ Title: "Failed to initialize JavaScript engine."; Message: $$JS; Default Button: “OK”, Commit: “Yes” ]
                                                                          • Set Variable [ $$JS; Value:"" ]
                                                                          • Exit Script [ ]
                                                                          • End If
                                                                          • #set a few standard variables for us
                                                                          • Set Variable [ $r; Value:MBS( "JS.Evaluate"; $$JS; JavaScript::LibPhoneNumber) ]
                                                                          • If [ MBS("IsError") ]
                                                                          • Show Custom Dialog [ Title: "Failed to set property."; Message: $r; Default Button: “OK”, Commit: “Yes” ]
                                                                          • 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: [Start Script]
                                                                                  Script NameEnd Script
                                                                                  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 ( $$JS ) > 0 ]
                                                                                      • Set Variable [ $r; Value:MBS("JS.Free"; $$JS) ]
                                                                                      • Set Variable [ $$JS; Value:"" ]
                                                                                      • End If
                                                                                      • Set Variable [ $r; Value:MBS("FM.ExecuteFileSQL"; Get(FileName); "UPDATE \"JavaScript\" SET \"Output\" = '' ") ]
                                                                                      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: JavaScript libPhoneNumber

                                                                                                    Used functions:




                                                                                                    Links
                                                                                                    MBS FileMaker Plugins