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

MBS FileMaker Plugin Example Databases

FM JSON Path

All examples are included with download of MBS FileMaker Plugin.

FM JSON Path.fmp12

Overview
Tables1
Relationships0
Layouts1
Scripts2
Value Lists0
Custom Functions0
Custom Menus24
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 Path
5 fields defined, 12 records
JSON Path

Fields

Table Name: JSON Path - 5 Fields
Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
JS LibNormal, TextAuto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Global
  • Repetitions: 1
  • Index Language: German
      InputNormal, TextAuto-Enter:
      • Allow editing
      Validation:
      • Only during data entry
      Storage:
      • Repetitions: 1
      • Indexing: None
      • Automatically create indexes as needed
      • Index Language: German
          PathNormal, TextAuto-Enter:
          • Allow editing
          Validation:
          • Only during data entry
          Storage:
          • Repetitions: 1
          • Indexing: None
          • Automatically create indexes as needed
          • Index Language: German
              InfoNormal, TextAuto-Enter:
              • Allow editing
              Validation:
              • Only during data entry
              Storage:
              • Repetitions: 1
              • Indexing: None
              • Automatically create indexes as needed
              • Index Language: German
                    ResultNormal, 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 Path

                        Regular Fields

                        Field Name: JSON Path::JS Lib
                        Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                        • Top: 125 pt
                        • Left: 138 pt
                        • Bottom: 156 pt
                        • Right: 946 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: JSON Path::Input
                        Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                        • Top: 181 pt
                        • Left: 138 pt
                        • Bottom: 606 pt
                        • Right: 946 pt
                        • Anchoring: Left, Top and Bottom
                        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 Path::Path
                        Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                        • Top: 615 pt
                        • Left: 138 pt
                        • Bottom: 676 pt
                        • Right: 596 pt
                        • Anchoring: Left, Bottom
                        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 Path::Result
                        Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                        • Top: 686 pt
                        • Left: 138 pt
                        • Bottom: 782 pt
                        • Right: 946 pt
                        • Anchoring: Left, Bottom
                        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 Path::Info
                        Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                        • Top: 615 pt
                        • Left: 606 pt
                        • Bottom: 676 pt
                        • Right: 946 pt
                        • Anchoring: Left, Bottom
                        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 PropertiesCoordinatesScript/Script Step
                          Type:
                        • Text: Execute
                        • Top: 621 pt
                        • Left: 464 pt
                        • Bottom: 652 pt
                        • Right: 590 pt
                        • Anchoring: Left, Bottom
                        Perform Script [ “Execute JSONPath” ]

                        Scripts:


                        Script Hierarchy

                        Info
                        Execute JSONPath

                        Next Script: [Execute JSONPath]
                        Script NameInfo
                        Run script with full access privilegesOff
                        Include In MenuYes
                        Layouts that use this script
                          Scripts that use this script
                            Script Definition
                            Script Steps
                            • #JSONPath
                            • #https://goessner.net/articles/JsonPath/
                            • #https://code.google.com/archive/p/jsonpath/downloads
                            • #Playground for JSONPath expressions
                            • #requires MBS Plugin > v11.3 for JavaScript functions
                            • #Adoption by Marcel Moré
                            • #https://blog.marcel-more.de/
                            • #v1.0 2023-08-21
                            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: [Info]
                                          Script NameExecute JSONPath
                                          Run script with full access privilegesOff
                                          Include In MenuYes
                                          Layouts that use this script
                                          Scripts that use this script
                                            Script Definition
                                            Script Steps
                                            • #prepare input parameters for JavaScript function
                                            • #obj should be proper JSON
                                            • #expr is converted from String to JSON parameter by MBS function 'JSON.CreateValue'
                                            • Set Variable [ $obj; Value:JSON Path::Input ]
                                            • Set Variable [ $expr; Value:MBS( "JSON.CreateValue"; JSON Path::Path ) ]
                                            • Set Variable [ $arg; Value:MBS( "JSON.CreateValue"; "" ) ]
                                            • #prepare JS environment
                                            • Set Variable [ $js; Value:MBS("JS.New") ]
                                            • #add function from JS Lib -> as stored in global field 'JS Lib'
                                            • Set Variable [ $r; Value:MBS("JS.AddFunction"; $js; "jsonPath"; JSON Path::JS Lib) ]
                                            • #run added JS function 'jsonPath' with prepared parameters
                                            • Set Variable [ $result; Value:MBS("JS.CallFunction"; $js; "jsonPath"; $obj; $expr; $arg ) ]
                                            • #release JS environment
                                            • Set Variable [ $r; Value:MBS("JS.Release";$js) ]
                                            • #write result from JS function to text field
                                            • Set Field [ JSON Path::Result; $result ]
                                            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: FM JSON Path

                                                    Used functions: