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

MBS FileMaker Plugin Example Databases

JSON Test

All examples are included with download of MBS FileMaker Plugin.

JSON Test.fmp12

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

 

Tables

Table Name
Statistics
Occurrences in Relationship Graph
JSON Test
6 fields defined, 2 records
JSON Test

Fields

Table Name: JSON Test - 6 Fields
Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
FirstNameNormal, TextAuto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Repetitions: 1
  • Indexing: None
  • Automatically create indexes as needed
  • Index Language: German
      LastNameNormal, TextAuto-Enter:
      • Allow editing
      Validation:
      • Only during data entry
      Storage:
      • Repetitions: 1
      • Indexing: None
      • Automatically create indexes as needed
      • Index Language: German
          Email1Normal, TextAuto-Enter:
          • Allow editing
          Validation:
          • Only during data entry
          Storage:
          • Repetitions: 1
          • Indexing: None
          • Automatically create indexes as needed
          • Index Language: German
              Email2Normal, TextAuto-Enter:
              • Allow editing
              Validation:
              • Only during data entry
              Storage:
              • Repetitions: 1
              • Indexing: None
              • Automatically create indexes as needed
              • Index Language: German
                  Email3Normal, TextAuto-Enter:
                  • Allow editing
                  Validation:
                  • Only during data entry
                  Storage:
                  • Repetitions: 1
                  • Indexing: None
                  • Automatically create indexes as needed
                  • Index Language: German
                      JSONNormal, TextAuto-Enter:
                      • Allow editing
                      Validation:
                      • Only during data entry
                      Storage:
                      • Repetitions: 1
                      • Indexing: None
                      • Automatically create indexes as needed
                      • Index Language: German

                          Layout Objects: JSON Test

                          Regular Fields

                          Field Name: JSON Test::FirstName
                          Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                          • Top: 24 pt
                          • Left: 138 pt
                          • Bottom: 38 pt
                          • Right: 391 pt
                          • Anchoring: Left, Top
                          Field Format:
                          • Edit Box
                          Field Behavior:
                          • Allow field to be entered: In Find mode, In Browse mode
                          • Touch keyboard type: System Default
                          • Go to next field using: Tab key
                          Yes

                          Field Name: JSON Test::LastName
                          Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                          • Top: 42 pt
                          • Left: 138 pt
                          • Bottom: 56 pt
                          • Right: 391 pt
                          • Anchoring: Left, Top
                          Field Format:
                          • Edit Box
                          Field Behavior:
                          • Allow field to be entered: In Find mode, In Browse mode
                          • Touch keyboard type: System Default
                          • Go to next field using: Tab key
                          Yes

                          Field Name: JSON Test::Email1
                          Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                          • Top: 60 pt
                          • Left: 138 pt
                          • Bottom: 74 pt
                          • Right: 391 pt
                          • Anchoring: Left, Top
                          Field Format:
                          • Edit Box
                          Field Behavior:
                          • Allow field to be entered: In Find mode, In Browse mode
                          • Touch keyboard type: System Default
                          • Go to next field using: Tab key
                          Yes

                          Field Name: JSON Test::Email2
                          Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                          • Top: 78 pt
                          • Left: 138 pt
                          • Bottom: 92 pt
                          • Right: 391 pt
                          • Anchoring: Left, Top
                          Field Format:
                          • Edit Box
                          Field Behavior:
                          • Allow field to be entered: In Find mode, In Browse mode
                          • Touch keyboard type: System Default
                          • Go to next field using: Tab key
                          Yes

                          Field Name: JSON Test::Email3
                          Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                          • Top: 96 pt
                          • Left: 138 pt
                          • Bottom: 110 pt
                          • Right: 391 pt
                          • Anchoring: Left, Top
                          Field Format:
                          • Edit Box
                          Field Behavior:
                          • Allow field to be entered: In Find mode, In Browse mode
                          • Touch keyboard type: System Default
                          • Go to next field using: Tab key
                          Yes

                          Field Name: JSON Test::JSON
                          Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                          • Top: 114 pt
                          • Left: 138 pt
                          • Bottom: 248 pt
                          • Right: 391 pt
                          • Anchoring: Left, Top
                          Field Format:
                          • Edit Box
                          Field Behavior:
                          • Allow field to be entered: In Find mode, In Browse mode
                          • Touch keyboard type: System Default
                          • Go to next field using: Tab key
                          Yes

                          Group Buttons

                          Button PropertiesCoordinatesScript/Script Step
                            Type:
                          • Text: Build JSON
                            Additional Properties:
                          • Change to hand cursor over button
                          • Rectangular
                          • Top: 72 pt
                          • Left: 414 pt
                          • Bottom: 97 pt
                          • Right: 541 pt
                          • Anchoring: Left, Top
                          Perform Script [ “BuildJSON” ]

                          Scripts:


                          Button PropertiesCoordinatesScript/Script Step
                            Type:
                          • Text: Parse JSON
                            Additional Properties:
                          • Change to hand cursor over button
                          • Rectangular
                          • Top: 108 pt
                          • Left: 414 pt
                          • Bottom: 133 pt
                          • Right: 541 pt
                          • Anchoring: Left, Top
                          Perform Script [ “ParseJSON” ]

                          Scripts:


                          Script Hierarchy

                          BuildJSON
                          ParseJSON

                          Next Script: [ParseJSON]
                          Script NameBuildJSON
                          Run script with full access privilegesOff
                          Include In MenuYes
                          Layouts that use this script
                          Scripts that use this script
                            Script Definition
                            Script Steps
                            • #Get Array of Emails
                            • Set Variable [ $Emails; Value:MBS("JSON.CreateStringArray"; JSON Test::Email1; JSON Test::Email2; JSON Test::Email3) ]
                            • #Encode Strings
                            • Set Variable [ $FirstName; Value:MBS("JSON.CreateString"; JSON Test::FirstName) ]
                            • Set Variable [ $LastName; Value:MBS("JSON.CreateString"; JSON Test::LastName) ]
                            • #Create Object
                            • Set Variable [ $object; Value:MBS("JSON.CreateObject") ]
                            • #Add items to object
                            • Set Variable [ $object; Value:MBS("JSON.AddItemToObject"; $object; "FirstName"; $FirstName) ]
                            • Set Variable [ $object; Value:MBS("JSON.AddItemToObject"; $object; "LastName"; $LastName) ]
                            • Set Variable [ $object; Value:MBS("JSON.AddItemToObject"; $object; "Emails"; $Emails) ]
                            • #Set field with final JSON string
                            • Set Field [ JSON Test::JSON; $object ]
                            • #Done
                            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: [BuildJSON]
                                    Script NameParseJSON
                                    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 [ $json; Value:JSON Test::JSON ]
                                      • #First Name
                                      • Set Variable [ $FirstNameJSON; Value:MBS("JSON.GetObjectItem"; $json; "Firstname") ]
                                      • Set Variable [ $FirstName; Value:MBS("JSON.GetStringValue"; $FirstNameJSON) ]
                                      • Set Field [ JSON Test::FirstName; $FirstName ]
                                      • #Last Name
                                      • Set Variable [ $LastNameJSON; Value:MBS("JSON.GetObjectItem"; $json; "LastName") ]
                                      • Set Variable [ $LastName; Value:MBS("JSON.GetStringValue"; $LastNameJSON) ]
                                      • Set Field [ JSON Test::LastName; $LastName ]
                                      • #Emails
                                      • Set Variable [ $EmailsJSON; Value:MBS("JSON.GetObjectItem"; $json; "Emails") ]
                                      • Set Variable [ $Email1JSON; Value:MBS("JSON.GetArrayItem"; $EmailsJSON; 0) ]
                                      • Set Variable [ $Email2JSON; Value:MBS("JSON.GetArrayItem"; $EmailsJSON; 1) ]
                                      • Set Variable [ $Email3JSON; Value:MBS("JSON.GetArrayItem"; $EmailsJSON; 2) ]
                                      • Set Variable [ $Email1; Value:MBS("JSON.GetStringValue"; $Email1JSON) ]
                                      • Set Variable [ $Email2; Value:MBS("JSON.GetStringValue"; $Email2JSON) ]
                                      • Set Variable [ $Email3; Value:MBS("JSON.GetStringValue"; $Email3JSON) ]
                                      • Set Field [ JSON Test::Email1; $Email1 ]
                                      • Set Field [ JSON Test::Email2; $Email2 ]
                                      • Set Field [ JSON Test::Email3; $Email3 ]
                                      • #Done
                                      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 Test

                                              Used functions: