MBS FileMaker Plugin Example Databases

SQL Select Container

All examples are included with download of MBS FileMaker Plugin.

SQL Select Container.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
SQL Select Container
6 fields defined, 2 records
SQL Select Container

Fields

Table Name: SQL Select Container - 6 Fields
Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
myNameNormal, TextAuto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Repetitions: 1
  • Indexing: Minimal
  • Automatically create indexes as needed
  • Index Language: German
        myContainerNormal, BinaryAuto-Enter:
        • Allow editing
        Validation:
        • Only during data entry
        Storage:
        • Repetitions: 1
              gNameNormal, TextAuto-Enter:
              • Allow editing
              Validation:
              • Only during data entry
              Storage:
              • Global
              • Repetitions: 1
              • Index Language: German
                  gContainerNormal, BinaryAuto-Enter:
                  • Allow editing
                  Validation:
                  • Only during data entry
                  Storage:
                  • Global
                  • Repetitions: 1
                      myRecordIDNormal, TextAuto-Enter: Validation:
                      • Only during data entry
                      Storage:
                      • Repetitions: 1
                      • Indexing: None
                      • Automatically create indexes as needed
                      • Index Language: German
                            gSQLNormal, TextAuto-Enter:
                            • Allow editing
                            Validation:
                            • Only during data entry
                            Storage:
                            • Global
                            • Repetitions: 1
                            • Index Language: German

                                Layout Objects: SQL Select Container

                                Regular Fields

                                Field Name: SQL Select Container::myName
                                Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                • Top: 186 pt
                                • Left: 138 pt
                                • Bottom: 200 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: SQL Select Container::myContainer
                                Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                • Top: 204 pt
                                • Left: 138 pt
                                • Bottom: 329 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
                                No

                                Field Name: SQL Select Container::gName
                                Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                • Top: 24 pt
                                • Left: 138 pt
                                • Bottom: 38 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
                                No

                                Field Name: SQL Select Container::gContainer
                                Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                • Top: 42 pt
                                • Left: 138 pt
                                • Bottom: 167 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
                                No

                                Field Name: SQL Select Container::myRecordID
                                Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                • Top: 330 pt
                                • Left: 138 pt
                                • Bottom: 344 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: SQL Select Container::gSQL
                                Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                • Top: 18 pt
                                • Left: 480 pt
                                • Bottom: 62 pt
                                • Right: 871 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
                                No

                                Group Buttons

                                Button PropertiesCoordinatesScript/Script Step
                                  Type:
                                • Text: Execute SQL
                                  Additional Properties:
                                • Change to hand cursor over button
                                • Rectangular
                                • Top: 84 pt
                                • Left: 480 pt
                                • Bottom: 109 pt
                                • Right: 613 pt
                                • Anchoring: Left, Top
                                Perform Script [ “Run” ]

                                Scripts:


                                Button PropertiesCoordinatesScript/Script Step
                                  Type:
                                • Text: Clear
                                  Additional Properties:
                                • Change to hand cursor over button
                                • Rectangular
                                • Top: 84 pt
                                • Left: 660 pt
                                • Bottom: 109 pt
                                • Right: 793 pt
                                • Anchoring: Left, Top
                                Perform Script [ “Clear” ]

                                Scripts:


                                Script Hierarchy

                                Run
                                Clear

                                Next Script: [Clear]
                                Script NameRun
                                Run script with full access privilegesOff
                                Include In MenuYes
                                Layouts that use this script
                                Scripts that use this script
                                  Script Definition
                                  Script Steps
                                  • #trace on
                                  • Set Variable [ $r; Value:MBS("Trace") ]
                                  • #run sql
                                  • Set Variable [ $SQL; Value:MBS("FM.SQL.Execute"; ""; SQL Select Container::gSQL) ]
                                  • If [ MBS("IsError") ]
                                  • Show Custom Dialog [ Title: "Error"; Message: $SQL; Default Button: “OK”, Commit: “Yes”; Button 2: “Cancel”, Commit: “No” ]
                                  • Exit Script [ ]
                                  • End If
                                  • # query some interesting facts about result
                                  • Set Variable [ $rowCount; Value:MBS("FM.SQL.RowCount"; $SQL) ]
                                  • Set Variable [ $fieldCount; Value:MBS("FM.SQL.FieldCount"; $SQL) ]
                                  • Set Variable [ $fieldTypeFirstFieldFirstRow; Value:MBS("FM.SQL.FieldType"; $SQL; 0; 0) ]
                                  • Set Variable [ $fieldTypeSecondFieldFirstRow; Value:MBS("FM.SQL.FieldType"; $SQL; 0; 1) ]
                                  • Set Variable [ $fieldValueFirstFieldFirstRow; Value:MBS("FM.SQL.Field"; $SQL; 0; 0) ]
                                  • Set Variable [ $fieldValueSecondFieldFirstRow; Value:MBS("FM.SQL.Field"; $SQL; 0; 1) ]
                                  • # and show in global fields
                                  • Set Field [ SQL Select Container::gName; $fieldValueFirstFieldFirstRow ]
                                  • Set Field [ SQL Select Container::gContainer; $fieldValueSecondFieldFirstRow ]
                                  • # cleanup
                                  • Set Variable [ $r; Value:MBS("FM.SQL.Release"; $SQL) ]
                                  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]
                                          Script NameClear
                                          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 [ SQL Select Container::gName; "" ]
                                            • Set Field [ SQL Select Container::gContainer; "" ]
                                            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: SQL Select Container

                                                    Used functions:




                                                    Links
                                                    MBS Xojo PDF Plugins