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

MBS FileMaker Plugin Example Databases

JSON Tests

All examples are included with download of MBS FileMaker Plugin.

JSON Tests.fmp12

Overview
Tables 1
Relationships 0
Layouts 1
Scripts 3
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 Off
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
JSON Tests
15 fields defined, 161 records
JSON Tests

Fields

Table Name: JSON Tests - 15 Fields
Field Name Type Options Comments On Layouts In Relationships In Scripts In Value Lists
PrimaryKey Normal, Text Auto-Enter: 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
                                          Input Normal, Text Auto-Enter:
                                          • Allow editing
                                          Validation:
                                          • Only during data entry
                                          Storage:
                                          • Repetitions: 1
                                          • Indexing: None
                                          • Automatically create indexes as needed
                                          • Index Language: German
                                              Output Normal, Text Auto-Enter:
                                              • Allow editing
                                              Validation:
                                              • Only during data entry
                                              Storage:
                                              • Repetitions: 1
                                              • Indexing: None
                                              • Automatically create indexes as needed
                                              • Index Language: German
                                                  Expression Normal, Text Auto-Enter: Validation:
                                                  • Only during data entry
                                                  Storage:
                                                  • Repetitions: 1
                                                  • Indexing: None
                                                  • Automatically create indexes as needed
                                                  • Index Language: German
                                                      Expected Output Normal, Text Auto-Enter:
                                                      • Allow editing
                                                      Validation:
                                                      • Only during data entry
                                                      Storage:
                                                      • Repetitions: 1
                                                      • Indexing: None
                                                      • Automatically create indexes as needed
                                                      • Index Language: German
                                                          Test Result Normal, Text Auto-Enter:
                                                          • Allow editing
                                                          Validation:
                                                          • Only during data entry
                                                          Storage:
                                                          • Repetitions: 1
                                                          • Indexing: None
                                                          • Automatically create indexes as needed
                                                          • Index Language: German
                                                              Last Success Date Normal, Timestamp Auto-Enter:
                                                              • Allow editing
                                                              Validation:
                                                              • Only during data entry
                                                              Storage:
                                                              • Repetitions: 1
                                                              • Indexing: None
                                                              • Automatically create indexes as needed
                                                              • Index Language: German
                                                                  Last Failed Date Normal, Timestamp Auto-Enter:
                                                                  • Allow editing
                                                                  Validation:
                                                                  • Only during data entry
                                                                  Storage:
                                                                  • Repetitions: 1
                                                                  • Indexing: All
                                                                  • Index Language: German
                                                                      Success MBS Version Normal, Text Auto-Enter:
                                                                      • Allow editing
                                                                      Validation:
                                                                      • Only during data entry
                                                                      Storage:
                                                                      • Repetitions: 1
                                                                      • Indexing: None
                                                                      • Automatically create indexes as needed
                                                                      • Index Language: German
                                                                          Failed MBS Version Normal, Text Auto-Enter:
                                                                          • Allow editing
                                                                          Validation:
                                                                          • Only during data entry
                                                                          Storage:
                                                                          • Repetitions: 1
                                                                          • Indexing: None
                                                                          • Automatically create indexes as needed
                                                                          • Index Language: German
                                                                              Title Normal, Text Auto-Enter: Validation:
                                                                              • Only during data entry
                                                                              Storage:
                                                                              • Repetitions: 1
                                                                              • Indexing: None
                                                                              • Automatically create indexes as needed
                                                                              • Index Language: German

                                                                                    Layout Objects: JSON Tests

                                                                                    Regular Fields

                                                                                    Field Name: JSON Tests::Input
                                                                                    Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                    • Top: 273 pt
                                                                                    • Left: 138 pt
                                                                                    • Bottom: 425 pt
                                                                                    • Right: 538 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: JSON Tests::Output
                                                                                    Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                    • Top: 115 pt
                                                                                    • Left: 639 pt
                                                                                    • Bottom: 266 pt
                                                                                    • Right: 1039 pt
                                                                                    • Anchoring: Left and Right, 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: JSON Tests::Expression
                                                                                    Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                    • Top: 114 pt
                                                                                    • Left: 138 pt
                                                                                    • Bottom: 266 pt
                                                                                    • Right: 538 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: JSON Tests::Expected Output
                                                                                    Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                    • Top: 274 pt
                                                                                    • Left: 639 pt
                                                                                    • Bottom: 425 pt
                                                                                    • Right: 1039 pt
                                                                                    • Anchoring: Left and Right, 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: JSON Tests::Test Result
                                                                                    Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                    • Top: 432 pt
                                                                                    • Left: 138 pt
                                                                                    • Bottom: 463 pt
                                                                                    • Right: 538 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: JSON Tests::Last Success Date
                                                                                    Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                    • Top: 530 pt
                                                                                    • Left: 138 pt
                                                                                    • Bottom: 561 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: JSON Tests::Last Failed Date
                                                                                    Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                    • Top: 530 pt
                                                                                    • Left: 528 pt
                                                                                    • Bottom: 561 pt
                                                                                    • Right: 781 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: JSON Tests::Success MBS Version
                                                                                    Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                    • Top: 565 pt
                                                                                    • Left: 138 pt
                                                                                    • Bottom: 596 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: JSON Tests::Failed MBS Version
                                                                                    Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                    • Top: 566 pt
                                                                                    • Left: 529 pt
                                                                                    • Bottom: 597 pt
                                                                                    • Right: 782 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: JSON Tests::Title
                                                                                    Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                    • Top: 37 pt
                                                                                    • Left: 205 pt
                                                                                    • Bottom: 74 pt
                                                                                    • Right: 770 pt
                                                                                    • Anchoring: Left, Top
                                                                                    Field Format:
                                                                                    • Edit Box
                                                                                    Field Behavior:
                                                                                    • Touch keyboard type: Default for Data Type
                                                                                    • Go to next field using: Tab key
                                                                                    Yes

                                                                                    Buttons

                                                                                    Button Properties Coordinates Script/Script Step
                                                                                      Type:
                                                                                    • Text: Test
                                                                                      Additional Properties:
                                                                                    • Change to hand cursor over button
                                                                                    • Top: 476 pt
                                                                                    • Left: 139 pt
                                                                                    • Bottom: 517 pt
                                                                                    • Right: 277 pt
                                                                                    • Anchoring: Left, Top
                                                                                    Perform Script [ “Run Test” ]

                                                                                    Scripts:


                                                                                    Button Properties Coordinates Script/Script Step
                                                                                      Type:
                                                                                    • Text: Run all tests
                                                                                      Additional Properties:
                                                                                    • Change to hand cursor over button
                                                                                    • Top: 35 pt
                                                                                    • Left: 25 pt
                                                                                    • Bottom: 76 pt
                                                                                    • Right: 178 pt
                                                                                    • Anchoring: Left, Top
                                                                                    Perform Script [ “Run all tests” ]

                                                                                    Scripts:


                                                                                    Script Hierarchy

                                                                                    Run Test
                                                                                    Run all tests
                                                                                    Clear

                                                                                    Next Script: [Run all tests]
                                                                                    Script Name Run Test
                                                                                    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
                                                                                    • Set Variable [ $input; Value:JSON Tests::Input ]
                                                                                    • #@variable $output
                                                                                    • Set Variable [ $error; Value:Let([e = EvaluationError(Let([$output = Evaluate ( JSON Tests::Expression )];1))];e) ]
                                                                                    • Set Field [ JSON Tests::Output; $output ]
                                                                                    • Set Field [ JSON Tests::Expression; JSON Tests::Expression ]
                                                                                    • If [ $error ]
                                                                                    • Set Variable [ $r; Value:0 ]
                                                                                    • Set Field [ JSON Tests::Test Result; "Error: " & $error ]
                                                                                    • Set Field [ JSON Tests::Last Failed Date; Get(CurrentTimestamp) ]
                                                                                    • Else If [ JSON Tests::Expected Output = "" ]
                                                                                    • Set Field [ JSON Tests::Expected Output; $output ]
                                                                                    • Set Field [ JSON Tests::Test Result; "" ]
                                                                                    • Set Variable [ $r; Value:1 ]
                                                                                    • Else [ ]
                                                                                    • Set Variable [ $expectedOutput; Value:JSON Tests::Expected Output ]
                                                                                    • #handle tabs
                                                                                    • Set Variable [ $expectedOutput; Value:Substitute($expectedOutput; Char(9); " ") ]
                                                                                    • Set Variable [ $Output; Value:Substitute($Output; Char(9); " ") ]
                                                                                    • Set Variable [ $r; Value:$output = $expectedOutput ]
                                                                                    • Set Field [ JSON Tests::Test Result; If($r; "Okay"; "Failed") ]
                                                                                    • If [ $r ]
                                                                                    • Set Field [ JSON Tests::Last Success Date; Get(CurrentTimestamp) ]
                                                                                    • Set Field [ JSON Tests::Success MBS Version; MBS("Version") ]
                                                                                    • Else [ ]
                                                                                    • Set Field [ JSON Tests::Last Failed Date; Get(CurrentTimestamp) ]
                                                                                    • Set Field [ JSON Tests::Failed MBS Version; MBS("Version") ]
                                                                                    • End If
                                                                                    • End If
                                                                                    • Commit Records/Requests [ No dialog ]
                                                                                    • Exit Script [ Result: $r ]
                                                                                    Fields used in this script
                                                                                    Scripts used in this script
                                                                                      Layouts used in this script
                                                                                        Tables used in this script
                                                                                        Table occurrences used by this script
                                                                                        Custom Functions used by this script
                                                                                          Custom menu set used by this script

                                                                                            Previous Script: [Run Test] Next Script: [Clear]
                                                                                            Script Name Run all tests
                                                                                            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
                                                                                              • Show All Records
                                                                                              • Go to Record/Request/Page [ No dialog; First ]
                                                                                              • Loop [ Flush: Minimum ]
                                                                                              • Perform Script [ “Run Test” ]
                                                                                              • If [ Get(ScriptResult) = 1 ]
                                                                                              • Omit Record
                                                                                              • Exit Loop If [ Get(FoundCount) = 0 ]
                                                                                              • Else [ ]
                                                                                              • Go to Record/Request/Page [ No dialog; Next; Exit after last ]
                                                                                              • End If
                                                                                              • End Loop
                                                                                              • If [ Get(FoundCount) = 0 ]
                                                                                              • Show Custom Dialog [ Message: "All correct!"; Default Button: “OK”, Commit: “Yes” ]
                                                                                              • Show All Records
                                                                                              • 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: [Run all tests]
                                                                                                          Script Name Clear
                                                                                                          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
                                                                                                              • Replace Field Contents [ JSON Tests::Output; Replace with calculation: "" ] [ No dialog ]
                                                                                                              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: JSON Tests

                                                                                                                      Used functions: