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

MBS FileMaker Plugin Example Databases

Insert or Update Tests

All examples are included with download of MBS FileMaker Plugin.

Insert or Update Tests.fmp12

Overview
Tables 2
Relationships 0
Layouts 2
Scripts 21
Value Lists 0
Custom Functions 0
Custom Menus 24
File Options
Default custom menu set [Standard FileMaker Menus]
Default theme Apex Blue
When opening file
Minimum allowed version 12.0
Login using Account Name; Account= Admin
Allow user to save password On
Require iOS passcode Off
Show Sign-in fields On
Switch to layout Off
Hide all toolbars Off
Script triggers
OnFirstWindowOpen Script: Start Script
OnLastWindowClose Off
OnWindowOpen Off
OnWindowClose Off
OnFileAVPlayerChange Off
OnWindowTransaction Off
Thumbnail Settings
Generate Thumbnails On; Temporary

 

Tables

Table Name
Statistics
Comments
Occurrences in Relationship Graph
Source
13 fields defined, 3 records
Source
Dest
14 fields defined, 0 record
Dest

Fields

Table Name: Source - 13 Fields
Field Name Type Options Comments On Layouts In Relationships In Scripts In Value Lists
PrimaryKey Normal, Text Auto-Enter:
  • Context table: Source
    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
        CreationTimestamp Normal, Timestamp Auto-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
                CreatedBy Normal, Text Auto-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
                        ModificationTimestamp Normal, Timestamp Auto-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
                                ModifiedBy Normal, Text Auto-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
                                        TextField Normal, Text Auto-Enter:
                                        • Allow editing
                                        Validation:
                                        • Only during data entry
                                        Storage:
                                        • Repetitions: 1
                                        • Indexing: None
                                        • Automatically create indexes as needed
                                        • Index Language: German
                                              NumberField Normal, Number Auto-Enter:
                                              • Allow editing
                                              Validation:
                                              • Only during data entry
                                              Storage:
                                              • Repetitions: 1
                                              • Indexing: None
                                              • Automatically create indexes as needed
                                              • Index Language: German
                                                    DateField Normal, Date Auto-Enter:
                                                    • Allow editing
                                                    Validation:
                                                    • Only during data entry
                                                    Storage:
                                                    • Repetitions: 1
                                                    • Indexing: None
                                                    • Automatically create indexes as needed
                                                    • Index Language: German
                                                          TimeField Normal, Time Auto-Enter:
                                                          • Allow editing
                                                          Validation:
                                                          • Only during data entry
                                                          Storage:
                                                          • Repetitions: 1
                                                          • Indexing: None
                                                          • Automatically create indexes as needed
                                                          • Index Language: German
                                                                TimestampField Normal, Timestamp Auto-Enter:
                                                                • Allow editing
                                                                Validation:
                                                                • Only during data entry
                                                                Storage:
                                                                • Repetitions: 1
                                                                • Indexing: None
                                                                • Automatically create indexes as needed
                                                                • Index Language: German
                                                                      ContainerField Normal, Binary Auto-Enter:
                                                                      • Allow editing
                                                                      Validation:
                                                                      • Only during data entry
                                                                      Storage:
                                                                      • Repetitions: 1
                                                                            Description Normal, Text Auto-Enter:
                                                                            • Allow editing
                                                                            Validation:
                                                                            • Only during data entry
                                                                            Storage:
                                                                            • Repetitions: 1
                                                                            • Indexing: None
                                                                            • Automatically create indexes as needed
                                                                            • Index Language: German
                                                                                  Hash Calculated, Number Calculation: Storage:
                                                                                  • Repetitions: 1
                                                                                  • Indexing: None
                                                                                  • Automatically create indexes as needed
                                                                                  • Index Language: German

                                                                                        Table Name: Dest - 14 Fields
                                                                                        Field Name Type Options Comments On Layouts In Relationships In Scripts In Value Lists
                                                                                        PrimaryKey Normal, Text Auto-Enter:
                                                                                        • Context table: Dest
                                                                                          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
                                                                                                CreationTimestamp Normal, Timestamp Auto-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
                                                                                                        CreatedBy Normal, Text Auto-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
                                                                                                                ModificationTimestamp Normal, Timestamp Auto-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
                                                                                                                        ModifiedBy Normal, Text Auto-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
                                                                                                                                TextField Normal, Text Auto-Enter:
                                                                                                                                • Allow editing
                                                                                                                                Validation:
                                                                                                                                • Only during data entry
                                                                                                                                Storage:
                                                                                                                                • Repetitions: 1
                                                                                                                                • Indexing: None
                                                                                                                                • Automatically create indexes as needed
                                                                                                                                • Index Language: German
                                                                                                                                      NumberField Normal, Number Auto-Enter:
                                                                                                                                      • Allow editing
                                                                                                                                      Validation:
                                                                                                                                      • Only during data entry
                                                                                                                                      Storage:
                                                                                                                                      • Repetitions: 1
                                                                                                                                      • Indexing: None
                                                                                                                                      • Automatically create indexes as needed
                                                                                                                                      • Index Language: German
                                                                                                                                            DateField Normal, Date Auto-Enter:
                                                                                                                                            • Allow editing
                                                                                                                                            Validation:
                                                                                                                                            • Only during data entry
                                                                                                                                            Storage:
                                                                                                                                            • Repetitions: 1
                                                                                                                                            • Indexing: None
                                                                                                                                            • Automatically create indexes as needed
                                                                                                                                            • Index Language: German
                                                                                                                                                  TimeField Normal, Time Auto-Enter:
                                                                                                                                                  • Allow editing
                                                                                                                                                  Validation:
                                                                                                                                                  • Only during data entry
                                                                                                                                                  Storage:
                                                                                                                                                  • Repetitions: 1
                                                                                                                                                  • Indexing: None
                                                                                                                                                  • Automatically create indexes as needed
                                                                                                                                                  • Index Language: German
                                                                                                                                                        TimestampField Normal, Timestamp Auto-Enter:
                                                                                                                                                        • Allow editing
                                                                                                                                                        Validation:
                                                                                                                                                        • Only during data entry
                                                                                                                                                        Storage:
                                                                                                                                                        • Repetitions: 1
                                                                                                                                                        • Indexing: None
                                                                                                                                                        • Automatically create indexes as needed
                                                                                                                                                        • Index Language: German
                                                                                                                                                              ContainerField Normal, Binary Auto-Enter:
                                                                                                                                                              • Allow editing
                                                                                                                                                              Validation:
                                                                                                                                                              • Only during data entry
                                                                                                                                                              Storage:
                                                                                                                                                              • Repetitions: 1
                                                                                                                                                                    Description Normal, Text Auto-Enter:
                                                                                                                                                                    • Allow editing
                                                                                                                                                                    Validation:
                                                                                                                                                                    • Only during data entry
                                                                                                                                                                    Storage:
                                                                                                                                                                    • Repetitions: 1
                                                                                                                                                                    • Indexing: None
                                                                                                                                                                    • Automatically create indexes as needed
                                                                                                                                                                    • Index Language: German
                                                                                                                                                                          Hash Calculated, Number Calculation: Storage:
                                                                                                                                                                          • Repetitions: 1
                                                                                                                                                                          • Indexing: None
                                                                                                                                                                          • Automatically create indexes as needed
                                                                                                                                                                          • Index Language: German
                                                                                                                                                                                Key Normal, Text Auto-Enter:
                                                                                                                                                                                • Allow editing
                                                                                                                                                                                Validation:
                                                                                                                                                                                • Only during data entry
                                                                                                                                                                                Storage:
                                                                                                                                                                                • Repetitions: 1
                                                                                                                                                                                • Indexing: Minimal
                                                                                                                                                                                • Automatically create indexes as needed
                                                                                                                                                                                • Index Language: German

                                                                                                                                                                                      Layout Objects: Source

                                                                                                                                                                                      Regular Fields

                                                                                                                                                                                      Field Name: Source::TextField
                                                                                                                                                                                      Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                                                                                                      • Top: 114 pt
                                                                                                                                                                                      • Left: 138 pt
                                                                                                                                                                                      • Bottom: 145 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: Default for Data Type
                                                                                                                                                                                      • Go to next field using: Tab key
                                                                                                                                                                                      Yes

                                                                                                                                                                                      Field Name: Source::NumberField
                                                                                                                                                                                      Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                                                                                                      • Top: 149 pt
                                                                                                                                                                                      • Left: 138 pt
                                                                                                                                                                                      • Bottom: 180 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: Default for Data Type
                                                                                                                                                                                      • Go to next field using: Tab key
                                                                                                                                                                                      Yes

                                                                                                                                                                                      Field Name: Source::DateField
                                                                                                                                                                                      Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                                                                                                      • Top: 184 pt
                                                                                                                                                                                      • Left: 138 pt
                                                                                                                                                                                      • Bottom: 215 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: Default for Data Type
                                                                                                                                                                                      • Go to next field using: Tab key
                                                                                                                                                                                      Yes

                                                                                                                                                                                      Field Name: Source::TimeField
                                                                                                                                                                                      Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                                                                                                      • Top: 219 pt
                                                                                                                                                                                      • Left: 138 pt
                                                                                                                                                                                      • Bottom: 250 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: Default for Data Type
                                                                                                                                                                                      • Go to next field using: Tab key
                                                                                                                                                                                      Yes

                                                                                                                                                                                      Field Name: Source::TimestampField
                                                                                                                                                                                      Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                                                                                                      • Top: 254 pt
                                                                                                                                                                                      • Left: 138 pt
                                                                                                                                                                                      • Bottom: 285 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: Default for Data Type
                                                                                                                                                                                      • Go to next field using: Tab key
                                                                                                                                                                                      Yes

                                                                                                                                                                                      Field Name: Source::ContainerField
                                                                                                                                                                                      Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                                                                                                      • Top: 289 pt
                                                                                                                                                                                      • Left: 138 pt
                                                                                                                                                                                      • Bottom: 414 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: Default for Data Type
                                                                                                                                                                                      • Go to next field using: Tab key
                                                                                                                                                                                      No

                                                                                                                                                                                      Field Name: Source::Description
                                                                                                                                                                                      Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                                                                                                      • Top: 418 pt
                                                                                                                                                                                      • Left: 138 pt
                                                                                                                                                                                      • Bottom: 449 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: Default for Data Type
                                                                                                                                                                                      • Go to next field using: Tab key
                                                                                                                                                                                      Yes

                                                                                                                                                                                      Field Name: Source::Hash
                                                                                                                                                                                      Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                                                                                                      • Top: 453 pt
                                                                                                                                                                                      • Left: 138 pt
                                                                                                                                                                                      • Bottom: 484 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: Default for Data Type
                                                                                                                                                                                      • Go to next field using: Tab key
                                                                                                                                                                                      Yes

                                                                                                                                                                                      Field Name: Source::PrimaryKey
                                                                                                                                                                                      Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                                                                                                      • Top: 488 pt
                                                                                                                                                                                      • Left: 138 pt
                                                                                                                                                                                      • Bottom: 519 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: Default for Data Type
                                                                                                                                                                                      • Go to next field using: Tab key
                                                                                                                                                                                      Yes

                                                                                                                                                                                      Buttons

                                                                                                                                                                                      Button Properties Coordinates Script/Script Step
                                                                                                                                                                                        Type:
                                                                                                                                                                                      • Text: Open Dest Window
                                                                                                                                                                                        Additional Properties:
                                                                                                                                                                                      • Change to hand cursor over button
                                                                                                                                                                                      • Top: 21 pt
                                                                                                                                                                                      • Left: 17 pt
                                                                                                                                                                                      • Bottom: 52 pt
                                                                                                                                                                                      • Right: 187 pt
                                                                                                                                                                                      • Anchoring: Left, Top
                                                                                                                                                                                      Perform Script [ “Open Dest Window” ]

                                                                                                                                                                                      Scripts:


                                                                                                                                                                                      Button Properties Coordinates Script/Script Step
                                                                                                                                                                                        Type:
                                                                                                                                                                                      • Text: Insert or Update with FMSQL
                                                                                                                                                                                        Additional Properties:
                                                                                                                                                                                      • Change to hand cursor over button
                                                                                                                                                                                      • Top: 21 pt
                                                                                                                                                                                      • Left: 204 pt
                                                                                                                                                                                      • Bottom: 52 pt
                                                                                                                                                                                      • Right: 457 pt
                                                                                                                                                                                      • Anchoring: Left, Top
                                                                                                                                                                                      Perform Script [ “Matrix.InsertOrUpdateRecords” ]

                                                                                                                                                                                      Scripts:


                                                                                                                                                                                      Button Properties Coordinates Script/Script Step
                                                                                                                                                                                        Type:
                                                                                                                                                                                      • Text: Insert or Update with Matrix
                                                                                                                                                                                        Additional Properties:
                                                                                                                                                                                      • Change to hand cursor over button
                                                                                                                                                                                      • Top: 67 pt
                                                                                                                                                                                      • Left: 204 pt
                                                                                                                                                                                      • Bottom: 98 pt
                                                                                                                                                                                      • Right: 457 pt
                                                                                                                                                                                      • Anchoring: Left, Top
                                                                                                                                                                                      Perform Script [ “Matrix.InsertOrUpdateRecords” ]

                                                                                                                                                                                      Scripts:


                                                                                                                                                                                      Layout Objects: Dest

                                                                                                                                                                                      Regular Fields

                                                                                                                                                                                      Field Name: Dest::TextField
                                                                                                                                                                                      Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                                                                                                      • Top: 114 pt
                                                                                                                                                                                      • Left: 138 pt
                                                                                                                                                                                      • Bottom: 145 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: Default for Data Type
                                                                                                                                                                                      • Go to next field using: Tab key
                                                                                                                                                                                      Yes

                                                                                                                                                                                      Field Name: Dest::NumberField
                                                                                                                                                                                      Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                                                                                                      • Top: 149 pt
                                                                                                                                                                                      • Left: 138 pt
                                                                                                                                                                                      • Bottom: 180 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: Default for Data Type
                                                                                                                                                                                      • Go to next field using: Tab key
                                                                                                                                                                                      Yes

                                                                                                                                                                                      Field Name: Dest::DateField
                                                                                                                                                                                      Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                                                                                                      • Top: 184 pt
                                                                                                                                                                                      • Left: 138 pt
                                                                                                                                                                                      • Bottom: 215 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: Default for Data Type
                                                                                                                                                                                      • Go to next field using: Tab key
                                                                                                                                                                                      Yes

                                                                                                                                                                                      Field Name: Dest::TimeField
                                                                                                                                                                                      Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                                                                                                      • Top: 219 pt
                                                                                                                                                                                      • Left: 138 pt
                                                                                                                                                                                      • Bottom: 250 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: Default for Data Type
                                                                                                                                                                                      • Go to next field using: Tab key
                                                                                                                                                                                      Yes

                                                                                                                                                                                      Field Name: Dest::TimestampField
                                                                                                                                                                                      Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                                                                                                      • Top: 254 pt
                                                                                                                                                                                      • Left: 138 pt
                                                                                                                                                                                      • Bottom: 285 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: Default for Data Type
                                                                                                                                                                                      • Go to next field using: Tab key
                                                                                                                                                                                      Yes

                                                                                                                                                                                      Field Name: Dest::ContainerField
                                                                                                                                                                                      Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                                                                                                      • Top: 289 pt
                                                                                                                                                                                      • Left: 138 pt
                                                                                                                                                                                      • Bottom: 414 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: Default for Data Type
                                                                                                                                                                                      • Go to next field using: Tab key
                                                                                                                                                                                      No

                                                                                                                                                                                      Field Name: Dest::Description
                                                                                                                                                                                      Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                                                                                                      • Top: 418 pt
                                                                                                                                                                                      • Left: 138 pt
                                                                                                                                                                                      • Bottom: 449 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: Default for Data Type
                                                                                                                                                                                      • Go to next field using: Tab key
                                                                                                                                                                                      Yes

                                                                                                                                                                                      Field Name: Dest::Hash
                                                                                                                                                                                      Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                                                                                                      • Top: 453 pt
                                                                                                                                                                                      • Left: 138 pt
                                                                                                                                                                                      • Bottom: 484 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: Default for Data Type
                                                                                                                                                                                      • Go to next field using: Tab key
                                                                                                                                                                                      Yes

                                                                                                                                                                                      Field Name: Dest::Key
                                                                                                                                                                                      Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                                                                                                      • Top: 488 pt
                                                                                                                                                                                      • Left: 138 pt
                                                                                                                                                                                      • Bottom: 519 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: Default for Data Type
                                                                                                                                                                                      • Go to next field using: Tab key
                                                                                                                                                                                      Yes

                                                                                                                                                                                      Buttons

                                                                                                                                                                                      Button Properties Coordinates Script/Script Step
                                                                                                                                                                                        Type:
                                                                                                                                                                                      • Text: Truncate Table
                                                                                                                                                                                        Additional Properties:
                                                                                                                                                                                      • Change to hand cursor over button
                                                                                                                                                                                      • Top: 21 pt
                                                                                                                                                                                      • Left: 17 pt
                                                                                                                                                                                      • Bottom: 52 pt
                                                                                                                                                                                      • Right: 187 pt
                                                                                                                                                                                      • Anchoring: Left, Top
                                                                                                                                                                                      Perform Script [ “Truncate Table” ]

                                                                                                                                                                                      Scripts:


                                                                                                                                                                                      Button Properties Coordinates Script/Script Step
                                                                                                                                                                                        Type:
                                                                                                                                                                                      • Text: Insert Records from Source to Dest with FMSQL
                                                                                                                                                                                        Additional Properties:
                                                                                                                                                                                      • Change to hand cursor over button
                                                                                                                                                                                      • Top: 21 pt
                                                                                                                                                                                      • Left: 204 pt
                                                                                                                                                                                      • Bottom: 52 pt
                                                                                                                                                                                      • Right: 582 pt
                                                                                                                                                                                      • Anchoring: Left, Top
                                                                                                                                                                                      Perform Script [ “FM.SQL.InsertRecords” ]

                                                                                                                                                                                      Scripts:


                                                                                                                                                                                      Button Properties Coordinates Script/Script Step
                                                                                                                                                                                        Type:
                                                                                                                                                                                      • Text: Insert Records from Source to Dest with Matrix
                                                                                                                                                                                        Additional Properties:
                                                                                                                                                                                      • Change to hand cursor over button
                                                                                                                                                                                      • Top: 67 pt
                                                                                                                                                                                      • Left: 204 pt
                                                                                                                                                                                      • Bottom: 98 pt
                                                                                                                                                                                      • Right: 582 pt
                                                                                                                                                                                      • Anchoring: Left, Top
                                                                                                                                                                                      Perform Script [ “Matrix.InsertRecords” ]

                                                                                                                                                                                      Scripts:


                                                                                                                                                                                      Script Hierarchy

                                                                                                                                                                                      Open Dest Window
                                                                                                                                                                                      Start Script
                                                                                                                                                                                      Truncate Table
                                                                                                                                                                                      -
                                                                                                                                                                                      FM.SQL.InsertRecords
                                                                                                                                                                                      FM.SQL.InsertOrUpdateRecords
                                                                                                                                                                                      -
                                                                                                                                                                                      Matrix.InsertRecords
                                                                                                                                                                                      Matrix.InsertOrUpdateRecords
                                                                                                                                                                                      -
                                                                                                                                                                                      FM.InsertRecordQuery
                                                                                                                                                                                      FM.InsertOrUpdateRecordQuery
                                                                                                                                                                                      -
                                                                                                                                                                                      Open SQLite Database
                                                                                                                                                                                      Delete Records in SQLite
                                                                                                                                                                                      Matrix.InsertRecordsToSQL
                                                                                                                                                                                      Matrix.InsertOrUpdateRecordsToSQL
                                                                                                                                                                                      FM.SQL.InsertRecordsToSQL
                                                                                                                                                                                      FM.SQL.InsertOrUpdateRecordsToSQL
                                                                                                                                                                                      -
                                                                                                                                                                                      FM.InsertRecord

                                                                                                                                                                                      Next Script: [Start Script]
                                                                                                                                                                                      Script Name Open Dest Window
                                                                                                                                                                                      Run script with full access privileges Off
                                                                                                                                                                                      Siri Shortcut Visible Off
                                                                                                                                                                                      Include In Menu Yes
                                                                                                                                                                                      Layouts that use this script
                                                                                                                                                                                      Scripts that use this script
                                                                                                                                                                                        Script Definition
                                                                                                                                                                                        Script Steps
                                                                                                                                                                                        • New Window [ Style: Document; Name: "Destination"; Using layout: “Dest” (Dest); Left: Get(WindowLeft) + Get(WindowWidth); Close: Yes; Minimize: Yes; Maximize: Yes; Resize: Yes; Menu Bar: Yes; Dim parent window: No; Toolbars: 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

                                                                                                                                                                                                    Previous Script: [Open Dest Window] Next Script: [Truncate Table]
                                                                                                                                                                                                    Script Name Start Script
                                                                                                                                                                                                    Run script with full access privileges Off
                                                                                                                                                                                                    Siri Shortcut Visible Off
                                                                                                                                                                                                    Include In Menu Yes
                                                                                                                                                                                                    Layouts that use this script
                                                                                                                                                                                                      Scripts that use this script
                                                                                                                                                                                                        Script Definition
                                                                                                                                                                                                        Script Steps
                                                                                                                                                                                                        • Go to Layout [ “Source” (Source) ]
                                                                                                                                                                                                        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] Next Script: [-]
                                                                                                                                                                                                                    Script Name Truncate Table
                                                                                                                                                                                                                    Run script with full access privileges Off
                                                                                                                                                                                                                    Siri Shortcut Visible Off
                                                                                                                                                                                                                    Include In Menu Yes
                                                                                                                                                                                                                    Layouts that use this script
                                                                                                                                                                                                                    Scripts that use this script
                                                                                                                                                                                                                      Script Definition
                                                                                                                                                                                                                      Script Steps
                                                                                                                                                                                                                      • #clear destination table
                                                                                                                                                                                                                      • Truncate Table [ No dialog; Table: “Dest” ]
                                                                                                                                                                                                                      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: [Truncate Table] Next Script: [FM.SQL.InsertRecords]
                                                                                                                                                                                                                                    Script Name -
                                                                                                                                                                                                                                    Run script with full access privileges Off
                                                                                                                                                                                                                                    Siri Shortcut Visible Off
                                                                                                                                                                                                                                    Include In Menu Yes
                                                                                                                                                                                                                                    Layouts that use this script
                                                                                                                                                                                                                                      Scripts that use this script
                                                                                                                                                                                                                                        Script Definition
                                                                                                                                                                                                                                        Script Steps
                                                                                                                                                                                                                                          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: [-] Next Script: [FM.SQL.InsertOrUpdateRecords]
                                                                                                                                                                                                                                                        Script Name FM.SQL.InsertRecords
                                                                                                                                                                                                                                                        Run script with full access privileges Off
                                                                                                                                                                                                                                                        Siri Shortcut Visible Off
                                                                                                                                                                                                                                                        Include In Menu Yes
                                                                                                                                                                                                                                                        Layouts that use this script
                                                                                                                                                                                                                                                        Scripts that use this script
                                                                                                                                                                                                                                                          Script Definition
                                                                                                                                                                                                                                                          Script Steps
                                                                                                                                                                                                                                                          • #Load records into a stored SQL result and insert into other table
                                                                                                                                                                                                                                                          • Set Variable [ $SelectSQL; Value:"SELECT TextField, NumberField, DateField, TimeField, TimestampField, ContainerField, Description, PrimaryKey FROM Source" ]
                                                                                                                                                                                                                                                          • Set Variable [ $InsertFields; Value:"TextField¶NumberField¶DateField¶TimeField¶TimestampField¶ContainerField¶Description¶Key" ]
                                                                                                                                                                                                                                                          • Set Variable [ $sql; Value:MBS("FM.SQL.Execute"; Get(FileName); $SelectSQL) ]
                                                                                                                                                                                                                                                          • If [ MBS("IsError") ]
                                                                                                                                                                                                                                                          • Show Custom Dialog [ Message: "Error: " & $sql; Default Button: “OK”, Commit: “No” ]
                                                                                                                                                                                                                                                          • Else [ ]
                                                                                                                                                                                                                                                          • Set Variable [ $result; Value:MBS("FM.SQL.InsertRecords"; $sql; Get(FileName); "Dest"; $InsertFields) ]
                                                                                                                                                                                                                                                          • If [ MBS("IsError") ]
                                                                                                                                                                                                                                                          • Show Custom Dialog [ Message: "Error: " & $result; Default Button: “OK”, Commit: “No” ]
                                                                                                                                                                                                                                                          • Else [ ]
                                                                                                                                                                                                                                                          • Show Custom Dialog [ Message: MBS("FM.SQL.RowCount"; $sql) & " records copied."; Default Button: “OK”, Commit: “Yes” ]
                                                                                                                                                                                                                                                          • End If
                                                                                                                                                                                                                                                          • End If
                                                                                                                                                                                                                                                          • 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: [FM.SQL.InsertRecords] Next Script: [-]
                                                                                                                                                                                                                                                                        Script Name FM.SQL.InsertOrUpdateRecords
                                                                                                                                                                                                                                                                        Run script with full access privileges Off
                                                                                                                                                                                                                                                                        Siri Shortcut Visible Off
                                                                                                                                                                                                                                                                        Include In Menu Yes
                                                                                                                                                                                                                                                                        Layouts that use this script
                                                                                                                                                                                                                                                                          Scripts that use this script
                                                                                                                                                                                                                                                                            Script Definition
                                                                                                                                                                                                                                                                            Script Steps
                                                                                                                                                                                                                                                                            • #Load records into a stored SQL result and insert/update into other table
                                                                                                                                                                                                                                                                            • Set Variable [ $SelectSQL; Value:"SELECT PrimaryKey, TextField, NumberField, DateField, TimeField, TimestampField, ContainerField, Description FROM Source" ]
                                                                                                                                                                                                                                                                            • Set Variable [ $InsertFields; Value:"Key¶TextField¶NumberField¶DateField¶TimeField¶TimestampField¶ContainerField¶Description" ]
                                                                                                                                                                                                                                                                            • Set Variable [ $sql; Value:MBS("FM.SQL.Execute"; Get(FileName); $SelectSQL) ]
                                                                                                                                                                                                                                                                            • If [ MBS("IsError") ]
                                                                                                                                                                                                                                                                            • Show Custom Dialog [ Message: "Error: " & $sql; Default Button: “OK”, Commit: “No”; Button 2: “Abbrechen”, Commit: “No” ]
                                                                                                                                                                                                                                                                            • Else [ ]
                                                                                                                                                                                                                                                                            • Set Variable [ $result; Value:MBS("FM.SQL.InsertOrUpdateRecords"; $sql; Get(FileName); "Dest"; $InsertFields; "Key=0") ]
                                                                                                                                                                                                                                                                            • If [ MBS("IsError") ]
                                                                                                                                                                                                                                                                            • Show Custom Dialog [ Message: "Error: " & $result; Default Button: “OK”, Commit: “No”; Button 2: “Abbrechen”, Commit: “No” ]
                                                                                                                                                                                                                                                                            • Else [ ]
                                                                                                                                                                                                                                                                            • Show Custom Dialog [ Title: "Records updated."; Message: $result; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                                                                                                                                                                                                                                                            • End If
                                                                                                                                                                                                                                                                            • End If
                                                                                                                                                                                                                                                                            • 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: [FM.SQL.InsertOrUpdateRecords] Next Script: [Matrix.InsertRecords]
                                                                                                                                                                                                                                                                                          Script Name -
                                                                                                                                                                                                                                                                                          Run script with full access privileges Off
                                                                                                                                                                                                                                                                                          Siri Shortcut Visible Off
                                                                                                                                                                                                                                                                                          Include In Menu Yes
                                                                                                                                                                                                                                                                                          Layouts that use this script
                                                                                                                                                                                                                                                                                            Scripts that use this script
                                                                                                                                                                                                                                                                                              Script Definition
                                                                                                                                                                                                                                                                                              Script Steps
                                                                                                                                                                                                                                                                                                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: [-] Next Script: [Matrix.InsertOrUpdateRecords]
                                                                                                                                                                                                                                                                                                              Script Name Matrix.InsertRecords
                                                                                                                                                                                                                                                                                                              Run script with full access privileges Off
                                                                                                                                                                                                                                                                                                              Siri Shortcut Visible Off
                                                                                                                                                                                                                                                                                                              Include In Menu Yes
                                                                                                                                                                                                                                                                                                              Layouts that use this script
                                                                                                                                                                                                                                                                                                              Scripts that use this script
                                                                                                                                                                                                                                                                                                                Script Definition
                                                                                                                                                                                                                                                                                                                Script Steps
                                                                                                                                                                                                                                                                                                                • #Load records into a matrix and insert to other table
                                                                                                                                                                                                                                                                                                                • Set Variable [ $SelectSQL; Value:"SELECT TextField, NumberField, DateField, TimeField, TimestampField, ContainerField, Description, PrimaryKey FROM Source" ]
                                                                                                                                                                                                                                                                                                                • Set Variable [ $InsertFields; Value:"TextField¶NumberField¶DateField¶TimeField¶TimestampField¶ContainerField¶Description¶Key" ]
                                                                                                                                                                                                                                                                                                                • Set Variable [ $sql; Value:MBS("Matrix.NewWithSQL"; Get(FileName); $SelectSQL) ]
                                                                                                                                                                                                                                                                                                                • If [ MBS("IsError") ]
                                                                                                                                                                                                                                                                                                                • Show Custom Dialog [ Message: "Error: " & $sql; Default Button: “OK”, Commit: “No” ]
                                                                                                                                                                                                                                                                                                                • Else [ ]
                                                                                                                                                                                                                                                                                                                • Set Variable [ $result; Value:MBS("Matrix.InsertRecords"; $sql; Get(FileName); "Dest"; $InsertFields) ]
                                                                                                                                                                                                                                                                                                                • If [ MBS("IsError") ]
                                                                                                                                                                                                                                                                                                                • Show Custom Dialog [ Message: "Error: " & $result; Default Button: “OK”, Commit: “No” ]
                                                                                                                                                                                                                                                                                                                • Else [ ]
                                                                                                                                                                                                                                                                                                                • Show Custom Dialog [ Message: MBS("Matrix.Height"; $sql) & " records copied."; Default Button: “OK”, Commit: “Yes” ]
                                                                                                                                                                                                                                                                                                                • End If
                                                                                                                                                                                                                                                                                                                • End If
                                                                                                                                                                                                                                                                                                                • Set Variable [ $r; Value:MBS("Matrix.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: [Matrix.InsertRecords] Next Script: [-]
                                                                                                                                                                                                                                                                                                                              Script Name Matrix.InsertOrUpdateRecords
                                                                                                                                                                                                                                                                                                                              Run script with full access privileges Off
                                                                                                                                                                                                                                                                                                                              Siri Shortcut Visible Off
                                                                                                                                                                                                                                                                                                                              Include In Menu Yes
                                                                                                                                                                                                                                                                                                                              Layouts that use this script
                                                                                                                                                                                                                                                                                                                              Scripts that use this script
                                                                                                                                                                                                                                                                                                                                Script Definition
                                                                                                                                                                                                                                                                                                                                Script Steps
                                                                                                                                                                                                                                                                                                                                • #Load records into a matrix and insert/update to other table
                                                                                                                                                                                                                                                                                                                                • Set Variable [ $SelectSQL; Value:"SELECT PrimaryKey, TextField, NumberField, DateField, TimeField, TimestampField, ContainerField, Description FROM Source" ]
                                                                                                                                                                                                                                                                                                                                • Set Variable [ $InsertFields; Value:"Key¶TextField¶NumberField¶DateField¶TimeField¶TimestampField¶ContainerField¶Description" ]
                                                                                                                                                                                                                                                                                                                                • Set Variable [ $sql; Value:MBS("Matrix.NewWithSQL"; Get(FileName); $SelectSQL) ]
                                                                                                                                                                                                                                                                                                                                • If [ MBS("IsError") ]
                                                                                                                                                                                                                                                                                                                                • Show Custom Dialog [ Message: "Error: " & $sql; Default Button: “OK”, Commit: “No”; Button 2: “Abbrechen”, Commit: “No” ]
                                                                                                                                                                                                                                                                                                                                • Else [ ]
                                                                                                                                                                                                                                                                                                                                • Set Variable [ $result; Value:MBS("Matrix.InsertOrUpdateRecords"; $sql; Get(FileName); "Dest"; $InsertFields; "Key=0") ]
                                                                                                                                                                                                                                                                                                                                • If [ MBS("IsError") ]
                                                                                                                                                                                                                                                                                                                                • Show Custom Dialog [ Message: "Error: " & $result; Default Button: “OK”, Commit: “No”; Button 2: “Abbrechen”, Commit: “No” ]
                                                                                                                                                                                                                                                                                                                                • Else [ ]
                                                                                                                                                                                                                                                                                                                                • Show Custom Dialog [ Title: "Records updated."; Message: $result; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                                                                                                                                                                                                                                                                                                                • End If
                                                                                                                                                                                                                                                                                                                                • End If
                                                                                                                                                                                                                                                                                                                                • Set Variable [ $r; Value:MBS("Matrix.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: [Matrix.InsertOrUpdateRecords] Next Script: [FM.InsertRecordQuery]
                                                                                                                                                                                                                                                                                                                                              Script Name -
                                                                                                                                                                                                                                                                                                                                              Run script with full access privileges Off
                                                                                                                                                                                                                                                                                                                                              Siri Shortcut Visible Off
                                                                                                                                                                                                                                                                                                                                              Include In Menu Yes
                                                                                                                                                                                                                                                                                                                                              Layouts that use this script
                                                                                                                                                                                                                                                                                                                                                Scripts that use this script
                                                                                                                                                                                                                                                                                                                                                  Script Definition
                                                                                                                                                                                                                                                                                                                                                  Script Steps
                                                                                                                                                                                                                                                                                                                                                    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: [-] Next Script: [FM.InsertOrUpdateRecordQuery]
                                                                                                                                                                                                                                                                                                                                                                  Script Name FM.InsertRecordQuery
                                                                                                                                                                                                                                                                                                                                                                  Run script with full access privileges Off
                                                                                                                                                                                                                                                                                                                                                                  Siri Shortcut Visible Off
                                                                                                                                                                                                                                                                                                                                                                  Include In Menu Yes
                                                                                                                                                                                                                                                                                                                                                                  Layouts that use this script
                                                                                                                                                                                                                                                                                                                                                                    Scripts that use this script
                                                                                                                                                                                                                                                                                                                                                                      Script Definition
                                                                                                                                                                                                                                                                                                                                                                      Script Steps
                                                                                                                                                                                                                                                                                                                                                                      • #Query some data and insert to other table directly
                                                                                                                                                                                                                                                                                                                                                                      • Set Variable [ $SelectSQL; Value:"SELECT TextField, NumberField, DateField, TimeField, TimestampField, ContainerField, Description, PrimaryKey FROM Source" ]
                                                                                                                                                                                                                                                                                                                                                                      • Set Variable [ $InsertFields; Value:"TextField¶NumberField¶DateField¶TimeField¶TimestampField¶ContainerField¶Description¶Key" ]
                                                                                                                                                                                                                                                                                                                                                                      • Set Variable [ $result; Value:MBS("FM.InsertRecordQuery"; Get(FileName); "Dest"; $InsertFields; Get(FileName); $SelectSQL) ]
                                                                                                                                                                                                                                                                                                                                                                      • If [ MBS("IsError") ]
                                                                                                                                                                                                                                                                                                                                                                      • Show Custom Dialog [ Message: "Error: " & $result; Default Button: “OK”, Commit: “No” ]
                                                                                                                                                                                                                                                                                                                                                                      • Else [ ]
                                                                                                                                                                                                                                                                                                                                                                      • Show Custom Dialog [ Message: $result & " records copied."; 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: [FM.InsertRecordQuery] Next Script: [-]
                                                                                                                                                                                                                                                                                                                                                                                    Script Name FM.InsertOrUpdateRecordQuery
                                                                                                                                                                                                                                                                                                                                                                                    Run script with full access privileges Off
                                                                                                                                                                                                                                                                                                                                                                                    Siri Shortcut Visible Off
                                                                                                                                                                                                                                                                                                                                                                                    Include In Menu Yes
                                                                                                                                                                                                                                                                                                                                                                                    Layouts that use this script
                                                                                                                                                                                                                                                                                                                                                                                      Scripts that use this script
                                                                                                                                                                                                                                                                                                                                                                                        Script Definition
                                                                                                                                                                                                                                                                                                                                                                                        Script Steps
                                                                                                                                                                                                                                                                                                                                                                                        • #Query some data and insert/update to other table directly
                                                                                                                                                                                                                                                                                                                                                                                        • Set Variable [ $SelectSQL; Value:"SELECT PrimaryKey, TextField, NumberField, DateField, TimeField, TimestampField, ContainerField, Description FROM Source" ]
                                                                                                                                                                                                                                                                                                                                                                                        • Set Variable [ $InsertFields; Value:"Key¶TextField¶NumberField¶DateField¶TimeField¶TimestampField¶ContainerField¶Description" ]
                                                                                                                                                                                                                                                                                                                                                                                        • Set Variable [ $result; Value:MBS("FM.InsertOrUpdateRecordQuery"; Get(FileName); "Dest"; $InsertFields; "Key=0"; Get(FileName); $SelectSQL) ]
                                                                                                                                                                                                                                                                                                                                                                                        • If [ MBS("IsError") ]
                                                                                                                                                                                                                                                                                                                                                                                        • Show Custom Dialog [ Message: "Error: " & $result; Default Button: “OK”, Commit: “No” ]
                                                                                                                                                                                                                                                                                                                                                                                        • Else [ ]
                                                                                                                                                                                                                                                                                                                                                                                        • Show Custom Dialog [ Message: $result & " records copied."; 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: [FM.InsertOrUpdateRecordQuery] Next Script: [Open SQLite Database]
                                                                                                                                                                                                                                                                                                                                                                                                      Script Name -
                                                                                                                                                                                                                                                                                                                                                                                                      Run script with full access privileges Off
                                                                                                                                                                                                                                                                                                                                                                                                      Siri Shortcut Visible Off
                                                                                                                                                                                                                                                                                                                                                                                                      Include In Menu Yes
                                                                                                                                                                                                                                                                                                                                                                                                      Layouts that use this script
                                                                                                                                                                                                                                                                                                                                                                                                        Scripts that use this script
                                                                                                                                                                                                                                                                                                                                                                                                          Script Definition
                                                                                                                                                                                                                                                                                                                                                                                                          Script Steps
                                                                                                                                                                                                                                                                                                                                                                                                            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: [-] Next Script: [Delete Records in SQLite]
                                                                                                                                                                                                                                                                                                                                                                                                                          Script Name Open SQLite Database
                                                                                                                                                                                                                                                                                                                                                                                                                          Run script with full access privileges Off
                                                                                                                                                                                                                                                                                                                                                                                                                          Siri Shortcut Visible Off
                                                                                                                                                                                                                                                                                                                                                                                                                          Include In Menu Yes
                                                                                                                                                                                                                                                                                                                                                                                                                          Layouts that use this script
                                                                                                                                                                                                                                                                                                                                                                                                                            Scripts that use this script
                                                                                                                                                                                                                                                                                                                                                                                                                            Script Definition
                                                                                                                                                                                                                                                                                                                                                                                                                            Script Steps
                                                                                                                                                                                                                                                                                                                                                                                                                            • #For testing we use a SQLite database.
                                                                                                                                                                                                                                                                                                                                                                                                                            • #You may change this to open MySQL, SQL Server, PostgreSQL or anyone else here
                                                                                                                                                                                                                                                                                                                                                                                                                            • Set Variable [ $Connection; Value:MBS("SQL.NewConnection") ]
                                                                                                                                                                                                                                                                                                                                                                                                                            • #Tell plugin where SQLite library is
                                                                                                                                                                                                                                                                                                                                                                                                                            • // Set Variable [ $result; Value:MBS("SQL.SetConnectionOption"; $Connection; "SQLITE.LIBS"; "sqlite3.dll") ]
                                                                                                                                                                                                                                                                                                                                                                                                                            • Set Variable [ $result; Value:MBS("SQL.InternalSQLiteLibrary.Activate") ]
                                                                                                                                                                                                                                                                                                                                                                                                                            • #Tell plugin we want to use SQLite
                                                                                                                                                                                                                                                                                                                                                                                                                            • Set Variable [ $result; Value:MBS("SQL.SetClient"; $Connection; "SQLite") ]
                                                                                                                                                                                                                                                                                                                                                                                                                            • Set Variable [ $path; Value:MBS("Path.AddPathComponent"; MBS("Folders.UserDesktop"); "test.sqlite") ]
                                                                                                                                                                                                                                                                                                                                                                                                                            • #Connect to database in read/write/create mode. Creates new file if none exists.
                                                                                                                                                                                                                                                                                                                                                                                                                            • Set Variable [ $result; Value:MBS("SQL.Connect"; $Connection; $path) ]
                                                                                                                                                                                                                                                                                                                                                                                                                            • If [ $result = "OK" ]
                                                                                                                                                                                                                                                                                                                                                                                                                            • #Create a table if needed
                                                                                                                                                                                                                                                                                                                                                                                                                            • Set Variable [ $Command; Value:MBS("SQL.NewCommand"; $Connection; "CREATE TABLE IF NOT EXISTS Test (TextField VARCHAR, NumberField DOUBLE, DateField DATE, TimeField TIME, TimestampField TIMESTAMP, ContainerField BLOB, Description VARCHAR, Key VARCHAR PRIMARY KEY)") ]
                                                                                                                                                                                                                                                                                                                                                                                                                            • Set Variable [ $result; Value:MBS("SQL.Execute"; $Command) ]
                                                                                                                                                                                                                                                                                                                                                                                                                            • Set Variable [ $r; Value:MBS("SQL.Commit"; $Connection) ]
                                                                                                                                                                                                                                                                                                                                                                                                                            • Set Variable [ $r; Value:MBS("SQL.FreeCommand"; $Command) ]
                                                                                                                                                                                                                                                                                                                                                                                                                            • If [ $result = "OK" ]
                                                                                                                                                                                                                                                                                                                                                                                                                            • Exit Script [ Result: $Connection ]
                                                                                                                                                                                                                                                                                                                                                                                                                            • End If
                                                                                                                                                                                                                                                                                                                                                                                                                            • End If
                                                                                                                                                                                                                                                                                                                                                                                                                            • Show Custom Dialog [ Message: "Error: " & $result; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                                                                                                                                                                                                                                                                                                                                                                                                            • Set Variable [ $result; Value:MBS("SQL.FreeConnection"; $Connection) ]
                                                                                                                                                                                                                                                                                                                                                                                                                            • Halt Script
                                                                                                                                                                                                                                                                                                                                                                                                                            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: [Open SQLite Database] Next Script: [Matrix.InsertRecordsToSQL]
                                                                                                                                                                                                                                                                                                                                                                                                                                          Script Name Delete Records in SQLite
                                                                                                                                                                                                                                                                                                                                                                                                                                          Run script with full access privileges Off
                                                                                                                                                                                                                                                                                                                                                                                                                                          Siri Shortcut Visible Off
                                                                                                                                                                                                                                                                                                                                                                                                                                          Include In Menu Yes
                                                                                                                                                                                                                                                                                                                                                                                                                                          Layouts that use this script
                                                                                                                                                                                                                                                                                                                                                                                                                                            Scripts that use this script
                                                                                                                                                                                                                                                                                                                                                                                                                                              Script Definition
                                                                                                                                                                                                                                                                                                                                                                                                                                              Script Steps
                                                                                                                                                                                                                                                                                                                                                                                                                                              • Perform Script [ “Open SQLite Database” ]
                                                                                                                                                                                                                                                                                                                                                                                                                                              • Set Variable [ $Connection; Value:Get (ScriptResult) ]
                                                                                                                                                                                                                                                                                                                                                                                                                                              • #Delete all records for the external database
                                                                                                                                                                                                                                                                                                                                                                                                                                              • Set Variable [ $Command; Value:MBS("SQL.NewCommand"; $Connection; "DELETE FROM Test") ]
                                                                                                                                                                                                                                                                                                                                                                                                                                              • Set Variable [ $result; Value:MBS("SQL.Execute"; $Command) ]
                                                                                                                                                                                                                                                                                                                                                                                                                                              • If [ MBS("IsError") ]
                                                                                                                                                                                                                                                                                                                                                                                                                                              • Show Custom Dialog [ Message: "Error: " & $result; Default Button: “OK”, Commit: “No” ]
                                                                                                                                                                                                                                                                                                                                                                                                                                              • Else [ ]
                                                                                                                                                                                                                                                                                                                                                                                                                                              • Set Variable [ $r; Value:MBS("SQL.Commit"; $Connection) ]
                                                                                                                                                                                                                                                                                                                                                                                                                                              • Set Variable [ $r; Value:MBS("SQL.FreeCommand"; $Command) ]
                                                                                                                                                                                                                                                                                                                                                                                                                                              • End If
                                                                                                                                                                                                                                                                                                                                                                                                                                              • Set Variable [ $result2; Value:MBS("SQL.FreeConnection"; $Connection) ]
                                                                                                                                                                                                                                                                                                                                                                                                                                              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: [Delete Records in SQLite] Next Script: [Matrix.InsertOrUpdateRecordsToSQL]
                                                                                                                                                                                                                                                                                                                                                                                                                                                          Script Name Matrix.InsertRecordsToSQL
                                                                                                                                                                                                                                                                                                                                                                                                                                                          Run script with full access privileges Off
                                                                                                                                                                                                                                                                                                                                                                                                                                                          Siri Shortcut Visible Off
                                                                                                                                                                                                                                                                                                                                                                                                                                                          Include In Menu Yes
                                                                                                                                                                                                                                                                                                                                                                                                                                                          Layouts that use this script
                                                                                                                                                                                                                                                                                                                                                                                                                                                            Scripts that use this script
                                                                                                                                                                                                                                                                                                                                                                                                                                                              Script Definition
                                                                                                                                                                                                                                                                                                                                                                                                                                                              Script Steps
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Perform Script [ “Open SQLite Database” ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Set Variable [ $Connection; Value:Get (ScriptResult) ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • #We query data with Matrix, store in memory and then insert records in SQL table
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Set Variable [ $SelectSQL; Value:"SELECT PrimaryKey, TextField, NumberField, DateField, TimeField, TimestampField, ContainerField, Description FROM Source" ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Set Variable [ $InsertFields; Value:"Key¶TextField¶NumberField¶DateField¶TimeField¶TimestampField¶ContainerField¶Description" ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Set Variable [ $sql; Value:MBS("Matrix.NewWithSQL"; Get(FileName); $SelectSQL) ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • If [ MBS("IsError") ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Show Custom Dialog [ Message: "Error: " & $sql; Default Button: “OK”, Commit: “No”; Button 2: “Abbrechen”, Commit: “No” ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Else [ ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Set Variable [ $result; Value:MBS("Matrix.InsertRecordsToSQL"; $sql; $Connection; "Test"; $InsertFields) ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • If [ MBS("IsError") ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Show Custom Dialog [ Message: "Error: " & $result; Default Button: “OK”, Commit: “No”; Button 2: “Abbrechen”, Commit: “No” ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Else [ ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Show Custom Dialog [ Message: "Record exported."; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • End If
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • End If
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Set Variable [ $r; Value:MBS("Matrix.Release"; $sql) ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Set Variable [ $result2; Value:MBS("SQL.FreeConnection"; $Connection) ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                              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: [Matrix.InsertRecordsToSQL] Next Script: [FM.SQL.InsertRecordsToSQL]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Script Name Matrix.InsertOrUpdateRecordsToSQL
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Run script with full access privileges Off
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Siri Shortcut Visible Off
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Include In Menu Yes
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Layouts that use this script
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Scripts that use this script
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Script Definition
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Script Steps
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Perform Script [ “Open SQLite Database” ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Set Variable [ $Connection; Value:Get (ScriptResult) ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • #We query data with Matrix, store in memory and then insert/update records in SQL table
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Set Variable [ $SelectSQL; Value:"SELECT PrimaryKey, TextField, NumberField, DateField, TimeField, TimestampField, ContainerField, Description FROM Source" ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Set Variable [ $InsertFields; Value:"Key¶TextField¶NumberField¶DateField¶TimeField¶TimestampField¶ContainerField¶Description" ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Set Variable [ $sql; Value:MBS("Matrix.NewWithSQL"; Get(FileName); $SelectSQL) ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • If [ MBS("IsError") ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Show Custom Dialog [ Message: "Error: " & $sql; Default Button: “OK”, Commit: “No”; Button 2: “Abbrechen”, Commit: “No” ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Else [ ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Set Variable [ $result; Value:MBS("Matrix.InsertOrUpdateRecordsToSQL"; $sql; $Connection; "Test"; $InsertFields; "Key=0") ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • If [ MBS("IsError") ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Show Custom Dialog [ Message: "Error: " & $result; Default Button: “OK”, Commit: “No”; Button 2: “Abbrechen”, Commit: “No” ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Else [ ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Show Custom Dialog [ Message: "Record exported."; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • End If
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • End If
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Set Variable [ $r; Value:MBS("Matrix.Release"; $sql) ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Set Variable [ $result2; Value:MBS("SQL.FreeConnection"; $Connection) ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              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: [Matrix.InsertOrUpdateRecordsToSQL] Next Script: [FM.SQL.InsertOrUpdateRecordsToSQL]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Script Name FM.SQL.InsertRecordsToSQL
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Run script with full access privileges Off
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Siri Shortcut Visible Off
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Include In Menu Yes
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Layouts that use this script
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Scripts that use this script
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Script Definition
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Script Steps
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Perform Script [ “Open SQLite Database” ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Set Variable [ $Connection; Value:Get (ScriptResult) ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • #We query data with SQL, store in memory and then insert records in SQL table
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Set Variable [ $SelectSQL; Value:"SELECT PrimaryKey, TextField, NumberField, DateField, TimeField, TimestampField, ContainerField, Description FROM Source" ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Set Variable [ $InsertFields; Value:"Key¶TextField¶NumberField¶DateField¶TimeField¶TimestampField¶ContainerField¶Description" ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Set Variable [ $sql; Value:MBS("FM.SQL.Execute"; Get(FileName); $SelectSQL) ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • If [ MBS("IsError") ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Show Custom Dialog [ Message: "Error: " & $sql; Default Button: “OK”, Commit: “No”; Button 2: “Abbrechen”, Commit: “No” ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Else [ ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Set Variable [ $result; Value:MBS("FM.SQL.InsertRecordsToSQL"; $sql; $Connection; "Test"; $InsertFields) ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • If [ MBS("IsError") ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Show Custom Dialog [ Message: "Error: " & $result; Default Button: “OK”, Commit: “No”; Button 2: “Abbrechen”, Commit: “No” ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Else [ ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Show Custom Dialog [ Message: "Record exported."; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • End If
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • End If
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Set Variable [ $r; Value:MBS("FM.SQL.Release"; $sql) ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Set Variable [ $result2; Value:MBS("SQL.FreeConnection"; $Connection) ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              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: [FM.SQL.InsertRecordsToSQL] Next Script: [-]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Script Name FM.SQL.InsertOrUpdateRecordsToSQL
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Run script with full access privileges Off
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Siri Shortcut Visible Off
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Include In Menu Yes
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Layouts that use this script
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Scripts that use this script
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Script Definition
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Script Steps
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Perform Script [ “Open SQLite Database” ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Set Variable [ $Connection; Value:Get (ScriptResult) ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • #We query data with SQL, store in memory and then insert/update records in SQL table
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Set Variable [ $SelectSQL; Value:"SELECT PrimaryKey, TextField, NumberField, DateField, TimeField, TimestampField, ContainerField, Description FROM Source" ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Set Variable [ $InsertFields; Value:"Key¶TextField¶NumberField¶DateField¶TimeField¶TimestampField¶ContainerField¶Description" ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Set Variable [ $sql; Value:MBS("FM.SQL.Execute"; Get(FileName); $SelectSQL) ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • If [ MBS("IsError") ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Show Custom Dialog [ Message: "Error: " & $sql; Default Button: “OK”, Commit: “No”; Button 2: “Abbrechen”, Commit: “No” ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Else [ ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Set Variable [ $result; Value:MBS("FM.SQL.InsertOrUpdateRecordsToSQL"; $sql; $Connection; "Test"; $InsertFields; "Key=0") ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • If [ MBS("IsError") ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Show Custom Dialog [ Message: "Error: " & $result; Default Button: “OK”, Commit: “No”; Button 2: “Abbrechen”, Commit: “No” ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Else [ ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Show Custom Dialog [ Message: "Record exported."; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • End If
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • End If
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Set Variable [ $r; Value:MBS("FM.SQL.Release"; $sql) ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Set Variable [ $result2; Value:MBS("SQL.FreeConnection"; $Connection) ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              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: [FM.SQL.InsertOrUpdateRecordsToSQL] Next Script: [FM.InsertRecord]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Script Name -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Run script with full access privileges Off
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Siri Shortcut Visible Off
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Include In Menu Yes
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Layouts that use this script
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Scripts that use this script
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Script Definition
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Script Steps
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                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: [-]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Script Name FM.InsertRecord
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Run script with full access privileges Off
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Siri Shortcut Visible Off
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Include In Menu Yes
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Layouts that use this script
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Scripts that use this script
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Script Definition
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Script Steps
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • #this inserts a record without using a layout
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Set Variable [ $result; Value:MBS("FM.InsertRecord"; Get(FileName); "Dest"; "TextField"; "Just a test"; "NumberField"; 123,45; "DateField"; Get(CurrentDate); "TimeField"; Get(CurrentTime); "TimestampField"; Get(CurrentTimestamp); "Description"; "Made via InsertRecord") ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • If [ MBS("IsError") ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Show Custom Dialog [ Message: "Error: " & $result; Default Button: “OK”, 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: Insert or Update Tests

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Used functions: