MBS FileMaker Plugin Example Databases

JSON Benchmark

All examples are included with download of MBS FileMaker Plugin.

JSON Benchmark.fmp12

Overview
Tables1
Relationships0
Layouts1
Scripts5
Value Lists0
Custom Functions0
Custom Menus0
File Options
Default custom menu set[Standard FileMaker Menus]
When opening file
Minimum allowed version12.0
Login usingAccount Name; Account= Admin
Allow user to save passwordOff
Require iOS passcodeOff
Switch to layoutOff
Hide all toolbarsOff
Script triggers
OnFirstWindowOpenOff
OnLastWindowCloseOff
OnWindowOpenOff
OnWindowCloseOff
OnFileAVPlayerChangeOff
Thumbnail Settings
Generate ThumbnailsOn; Temporary

 

Tables

Table Name
Statistics
Occurrences in Relationship Graph
JSON Tests
2 fields defined, 1 record
JSON Tests

Fields

Table Name: JSON Tests - 2 Fields
Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
textNormal, TextAuto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Repetitions: 1
  • Indexing: None
  • Automatically create indexes as needed
  • Index Language: German
      TimeNormal, NumberAuto-Enter:
      • Allow editing
      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::text
          Field PropertiesCoordinatesField FormatField BehaviorQuick Find
          • Top: 59 pt
          • Left: 74 pt
          • Bottom: 521 pt
          • Right: 997 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::Time
          Field PropertiesCoordinatesField FormatField BehaviorQuick Find
          • Top: 131 pt
          • Left: 6 pt
          • Bottom: 152 pt
          • Right: 69 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

          Script Hierarchy

          Build JSON Array in FM
          Build JSON Array with MBS
          Get Values from Array with FM
          Get Values from Array with MBS
          Clear

          Next Script: [Build JSON Array with MBS]
          Script NameBuild JSON Array in FM
          Run script with full access privilegesOff
          Include In MenuYes
          Layouts that use this script
            Scripts that use this script
              Script Definition
              Script Steps
              • Set Variable [ $StartTime; Value:Get(CurrentTimeUTCMilliseconds) ]
              • Set Variable [ $i; Value:0 ]
              • Set Variable [ $json; Value:"" ]
              • Loop
              • Set Variable [ $json; Value:JSONSetElement ( $json ; "[" & $i & "]" ; "Hello " & $i; "string" ) ]
              • Set Variable [ $i; Value:$i + 1 ]
              • Exit Loop If [ $i = 2000 ]
              • End Loop
              • Set Field [ JSON Tests::text; JSONFormatElements ( $json ) ]
              • Set Variable [ $EndTime; Value:Get(CurrentTimeUTCMilliseconds) ]
              • Set Variable [ $Time; Value:$EndTime - $StartTime ]
              • Set Field [ JSON Tests::Time; $Time ]
              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: [Build JSON Array in FM]Next Script: [Get Values from Array with FM]
                      Script NameBuild JSON Array with MBS
                      Run script with full access privilegesOff
                      Include In MenuYes
                      Layouts that use this script
                        Scripts that use this script
                          Script Definition
                          Script Steps
                          • #Please use non-debug plugin and turn trace off
                          • Set Variable [ $r; Value:MBS("Trace.off") ]
                          • #Please disable Trace as writing log reduces speed a lot
                          • Set Variable [ $StartTime; Value:Get(CurrentTimeUTCMilliseconds) ]
                          • Set Variable [ $i; Value:0 ]
                          • Set Variable [ $jsonRef; Value:MBS( "JSON.CreateArrayRef" ) ]
                          • Loop
                          • Set Variable [ $r; Value:MBS("JSON.AddItemToArray"; $jsonRef; MBS( "JSON.CreateString"; "Hello " & $i )) ]
                          • Set Variable [ $i; Value:$i + 1 ]
                          • Exit Loop If [ $i = 2000 ]
                          • End Loop
                          • Set Field [ JSON Tests::text; MBS( "JSON.Format"; $jsonRef ) ]
                          • Set Variable [ $r; Value:MBS("JSON.Release"; $jsonRef) ]
                          • Set Variable [ $EndTime; Value:Get(CurrentTimeUTCMilliseconds) ]
                          • Set Variable [ $Time; Value:$EndTime - $StartTime ]
                          • Set Field [ JSON Tests::Time; $Time ]
                          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: [Build JSON Array with MBS]Next Script: [Get Values from Array with MBS]
                                  Script NameGet Values from Array with FM
                                  Run script with full access privilegesOff
                                  Include In MenuYes
                                  Layouts that use this script
                                    Scripts that use this script
                                      Script Definition
                                      Script Steps
                                      • Set Variable [ $StartTime; Value:Get(CurrentTimeUTCMilliseconds) ]
                                      • Set Variable [ $i; Value:0 ]
                                      • Set Variable [ $json; Value:JSON Tests::text ]
                                      • Set Variable [ $c; Value:ValueCount(JSONListKeys(JSON Tests::text; "")) ]
                                      • Loop
                                      • Set Variable [ $value; Value:JSONGetElement ( $json ; "[" & $i & "]" ) ]
                                      • Set Variable [ $i; Value:$i + 1 ]
                                      • Exit Loop If [ $i = $c ]
                                      • End Loop
                                      • Set Variable [ $EndTime; Value:Get(CurrentTimeUTCMilliseconds) ]
                                      • Set Variable [ $Time; Value:$EndTime - $StartTime ]
                                      • Set Field [ JSON Tests::Time; $Time ]
                                      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: [Get Values from Array with FM]Next Script: [Clear]
                                              Script NameGet Values from Array with MBS
                                              Run script with full access privilegesOff
                                              Include In MenuYes
                                              Layouts that use this script
                                                Scripts that use this script
                                                  Script Definition
                                                  Script Steps
                                                  • Set Variable [ $StartTime; Value:Get(CurrentTimeUTCMilliseconds) ]
                                                  • Set Variable [ $i; Value:0 ]
                                                  • Set Variable [ $json; Value:JSON Tests::text ]
                                                  • Set Variable [ $jsonRef; Value:MBS( "JSON.Parse"; $json ) ]
                                                  • Set Variable [ $c; Value:MBS( "JSON.GetArraySize"; $jsonRef ) ]
                                                  • Loop
                                                  • Set Variable [ $value; Value:MBS( "JSON.GetPathItem"; $jsonRef; $i; 1) ]
                                                  • Set Variable [ $i; Value:$i + 1 ]
                                                  • Exit Loop If [ $i = $c ]
                                                  • End Loop
                                                  • Set Variable [ $r; Value:MBS("JSON.Release"; $jsonRef) ]
                                                  • Set Variable [ $EndTime; Value:Get(CurrentTimeUTCMilliseconds) ]
                                                  • Set Variable [ $Time; Value:$EndTime - $StartTime ]
                                                  • Set Field [ JSON Tests::Time; $Time ]
                                                  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: [Get Values from Array with MBS]
                                                          Script NameClear
                                                          Run script with full access privilegesOff
                                                          Include In MenuYes
                                                          Layouts that use this script
                                                            Scripts that use this script
                                                              Script Definition
                                                              Script Steps
                                                              • Set Field [ JSON Tests::text; "" ]
                                                              • Set Field [ JSON Tests::Time; "" ]
                                                              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 Benchmark

                                                                      Used functions:




                                                                      Links
                                                                      MBS Xojo PDF Plugins