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

MBS FileMaker Plugin Example Databases

Create Fields in Filemaker Table

All examples are included with download of MBS FileMaker Plugin.

Create Fields in Filemaker Table.fmp12

Overview
Tables1
Relationships0
Layouts1
Scripts2
Value Lists0
Custom Functions0
Custom Menus33
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
TestTable
2 fields defined, 1 record
TestTable

Fields

Table Name: TestTable - 2 Fields
Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
TextFieldNormal, TextAuto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Repetitions: 1
  • Indexing: None
  • Automatically create indexes as needed
  • Index Language: German
        NumberFieldNormal, NumberAuto-Enter:
        • Allow editing
        Validation:
        • Only during data entry
        Storage:
        • Repetitions: 1
        • Indexing: None
        • Automatically create indexes as needed
        • Index Language: German

              Layout Objects: TestTable

              Regular Fields

              Field Name: TestTable::TextField
              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
              • Top: 72 pt
              • Left: 138 pt
              • Bottom: 86 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: System Default
              • Go to next field using: Tab key
              Yes

              Field Name: TestTable::NumberField
              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
              • Top: 90 pt
              • Left: 138 pt
              • Bottom: 104 pt
              • Right: 217 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

              Group Buttons

              Button PropertiesCoordinatesScript/Script Step
                Type:
              • Text: Tables
                Additional Properties:
              • Change to hand cursor over button
              • Rectangular
              • Top: 12 pt
              • Left: 24 pt
              • Bottom: 37 pt
              • Right: 163 pt
              • Anchoring: Left, Top
              Show Custom Dialog [ Title: "Tables"; Message: MBS("FM.ExecuteSQL";"select BaseTableName from FILEMAKER_TABLES"); Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]

              Button PropertiesCoordinatesScript/Script Step
                Type:
              • Text: Fields
                Additional Properties:
              • Change to hand cursor over button
              • Rectangular
              • Top: 12 pt
              • Left: 180 pt
              • Bottom: 37 pt
              • Right: 319 pt
              • Anchoring: Left, Top
              Show Custom Dialog [ Title: "Tables"; Message: MBS("FM.ExecuteSQL";"SELECT * FROM FileMaker_Fields"); Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]

              Button PropertiesCoordinatesScript/Script Step
                Type:
              • Text: Add Field
                Additional Properties:
              • Change to hand cursor over button
              • Rectangular
              • Top: 12 pt
              • Left: 342 pt
              • Bottom: 37 pt
              • Right: 481 pt
              • Anchoring: Left, Top
              Perform Script [ “AddField” ]

              Scripts:


              Button PropertiesCoordinatesScript/Script Step
                Type:
              • Text: Remove Field
                Additional Properties:
              • Change to hand cursor over button
              • Rectangular
              • Top: 12 pt
              • Left: 498 pt
              • Bottom: 37 pt
              • Right: 637 pt
              • Anchoring: Left, Top
              Perform Script [ “RemoveField” ]

              Scripts:


              Script Hierarchy

              AddField
              RemoveField

              Next Script: [RemoveField]
              Script NameAddField
              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("FM.ExecuteSQLOnIdle";"ALTER TABLE TestTable ADD MyField varchar") ]
                • Pause/Resume Script [ Duration (seconds): ,1 ]
                • If [ MBS("FM.ExecuteSQL.LastError") ≠ 0 ]
                • Show Custom Dialog [ Title: "Error adding column"; Message: MBS("FM.ExecuteSQL.LastError") & ": " & MBS("FM.ExecuteSQL.LastErrorMessage"); Default Button: “OK”, Commit: “No”; Button 2: “Abbrechen”, Commit: “No” ]
                • Else
                • Show Custom Dialog [ Title: "Removed Column"; Message: "OK"; Default Button: “OK”, Commit: “No”; Button 2: “Abbrechen”, Commit: “No” ]
                • 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: [AddField]
                              Script NameRemoveField
                              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("FM.ExecuteSQLOnIdle";"ALTER TABLE TestTable DROP COLUMN MyField") ]
                                • Pause/Resume Script [ Duration (seconds): ,1 ]
                                • If [ MBS("FM.ExecuteSQL.LastError") ≠ 0 ]
                                • Show Custom Dialog [ Title: "Error removing column"; Message: MBS("FM.ExecuteSQL.LastError") & ": " & MBS("FM.ExecuteSQL.LastErrorMessage"); Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                • Else
                                • Show Custom Dialog [ Title: "Removed Column"; Message: "OK"; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                • 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

                                              Download example: Create Fields in Filemaker Table

                                              Used functions: