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

MBS FileMaker Plugin Example Databases

JSON Order Parsing

All examples are included with download of MBS FileMaker Plugin.

JSON Order Parsing.fmp12

Overview
Tables1
Relationships0
Layouts1
Scripts1
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 Order Parsing
6 fields defined, 0 record
JSON Order Parsing

Fields

Table Name: JSON Order Parsing - 6 Fields
Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
InputNormal, TextAuto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Global
  • Repetitions: 1
  • Index Language: German
      OrderNormal, TextAuto-Enter:
      • Allow editing
      Validation:
      • Only during data entry
      Storage:
      • Repetitions: 1
      • Indexing: None
      • Automatically create indexes as needed
      • Index Language: German
          OrderNumberNormal, TextAuto-Enter:
          • Allow editing
          Validation:
          • Only during data entry
          Storage:
          • Repetitions: 1
          • Indexing: None
          • Automatically create indexes as needed
          • Index Language: German
              StatusNormal, TextAuto-Enter:
              • Allow editing
              Validation:
              • Only during data entry
              Storage:
              • Repetitions: 1
              • Indexing: None
              • Automatically create indexes as needed
              • Index Language: German
                  CustomerFirstNameNormal, TextAuto-Enter:
                  • Allow editing
                  Validation:
                  • Only during data entry
                  Storage:
                  • Repetitions: 1
                  • Indexing: None
                  • Automatically create indexes as needed
                  • Index Language: German
                      CustomerLastNameNormal, 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 Order Parsing

                          Regular Fields

                          Field Name: JSON Order Parsing::Input
                          Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                          • Top: 6 pt
                          • Left: 48 pt
                          • Bottom: 164 pt
                          • Right: 553 pt
                          • Anchoring: Left, Top
                          Field Format:
                          • Edit Box
                          Field Behavior:
                          • Allow field to be entered: In Find mode, In Browse mode
                          • Touch keyboard type: System Default
                          • Go to next field using: Tab key
                          No

                          Field Name: JSON Order Parsing::Order
                          Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                          • Top: 174 pt
                          • Left: 48 pt
                          • Bottom: 398 pt
                          • Right: 553 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 Order Parsing::OrderNumber
                          Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                          • Top: 402 pt
                          • Left: 138 pt
                          • Bottom: 416 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 Order Parsing::Status
                          Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                          • Top: 420 pt
                          • Left: 138 pt
                          • Bottom: 434 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 Order Parsing::CustomerFirstName
                          Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                          • Top: 438 pt
                          • Left: 138 pt
                          • Bottom: 452 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 Order Parsing::CustomerLastName
                          Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                          • Top: 456 pt
                          • Left: 138 pt
                          • Bottom: 470 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: Process JSON
                            Additional Properties:
                          • Change to hand cursor over button
                          • Rectangular
                          • Top: 6 pt
                          • Left: 570 pt
                          • Bottom: 31 pt
                          • Right: 727 pt
                          • Anchoring: Left, Top
                          Perform Script [ “Process” ]

                          Scripts:


                          Script Hierarchy

                          Process

                          Script NameProcess
                          Run script with full access privilegesOff
                          Include In MenuYes
                          Layouts that use this script
                          Scripts that use this script
                            Script Definition
                            Script Steps
                            • Delete All Records [ No dialog ]
                            • Set Variable [ $orders; Value:MBS( "JSON.GetObjectItem"; JSON Order Parsing::Input; "orders" ) ]
                            • Set Variable [ $count; Value:MBS( "JSON.GetArraySize"; $orders ) ]
                            • Set Variable [ $index; Value:0 ]
                            • Loop
                            • # check this order
                            • New Record/Request
                            • Set Variable [ $order; Value:MBS( "JSON.GetArrayItem"; $orders; $index ) ]
                            • Set Field [ JSON Order Parsing::Order; $order ]
                            • # get some values from order object
                            • Set Field [ JSON Order Parsing::OrderNumber; MBS( "JSON.GetStringValue"; MBS( "JSON.GetObjectItem"; $order; "order_number" )) ]
                            • Set Field [ JSON Order Parsing::Status; MBS( "JSON.GetStringValue"; MBS( "JSON.GetObjectItem"; $order; "status" )) ]
                            • # now look into customer object
                            • Set Variable [ $customer; Value:MBS( "JSON.GetObjectItem"; $order; "customer" ) ]
                            • Set Field [ JSON Order Parsing::CustomerFirstName; MBS( "JSON.GetStringValue"; MBS( "JSON.GetObjectItem"; $customer; "first_name" )) ]
                            • Set Field [ JSON Order Parsing::CustomerLastName; MBS( "JSON.GetStringValue"; MBS( "JSON.GetObjectItem"; $customer; "last_name" )) ]
                            • Commit Records/Requests [ Skip data entry validation; No dialog ]
                            • # next
                            • Set Variable [ $Index; Value:$index + 1 ]
                            • Exit Loop If [ $index = $count ]
                            • End Loop
                            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 Order Parsing

                                    Used functions: