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

MBS FileMaker Plugin Example Databases

XML and JSON

All examples are included with download of MBS FileMaker Plugin.

XML and JSON.fmp12

Overview
Tables1
Relationships0
Layouts2
Scripts3
Value Lists1
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
Table
9 fields defined, 5 records
Table

Fields

Table Name: Table - 9 Fields
Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
PrimaryKeyNormal, TextAuto-Enter:
  • Context table: Table
    Calculation: Get( UUID )
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
          CreationTimestampNormal, TimestampAuto-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
                  CreatedByNormal, TextAuto-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
                          ModificationTimestampNormal, TimestampAuto-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
                                  ModifiedByNormal, TextAuto-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
                                          EingabeNormal, TextAuto-Enter:
                                          • Allow editing
                                          Validation:
                                          • Only during data entry
                                          Storage:
                                          • Repetitions: 1
                                          • Indexing: None
                                          • Automatically create indexes as needed
                                          • Index Language: German
                                              AusgabeNormal, TextAuto-Enter:
                                              • Allow editing
                                              Validation:
                                              • Only during data entry
                                              Storage:
                                              • Repetitions: 1
                                              • Indexing: None
                                              • Automatically create indexes as needed
                                              • Index Language: German
                                                  AuswahlNormal, TextAuto-Enter:
                                                  • Allow editing
                                                  Validation:
                                                  • Only during data entry
                                                  Storage:
                                                  • Repetitions: 1
                                                  • Indexing: None
                                                  • Automatically create indexes as needed
                                                  • Index Language: German
                                                      RootNodeNormal, TextAuto-Enter:
                                                      • Allow editing
                                                      Validation:
                                                      • Only during data entry
                                                      Storage:
                                                      • Repetitions: 1
                                                      • Indexing: None
                                                      • Automatically create indexes as needed
                                                      • Index Language: German

                                                          Layout Objects: XML zu JSON

                                                          Regular Fields

                                                          Field Name: Table::Eingabe
                                                          Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                          • Top: 115 pt
                                                          • Left: 7 pt
                                                          • Bottom: 454 pt
                                                          • Right: 369 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: Table::Ausgabe
                                                          Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                          • Top: 115 pt
                                                          • Left: 380 pt
                                                          • Bottom: 454 pt
                                                          • Right: 742 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: Table::Auswahl
                                                          Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                          • Top: 166 pt
                                                          • Left: 746 pt
                                                          • Bottom: 313 pt
                                                          • Right: 1014 pt
                                                          • Anchoring: Left, Top
                                                          Field Format:
                                                          • Checkbox Set
                                                          • Display values from: options
                                                          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: XML -> JSON
                                                          • Top: 120 pt
                                                          • Left: 753 pt
                                                          • Bottom: 166 pt
                                                          • Right: 950 pt
                                                          • Anchoring: Left, Top
                                                          Perform Script [ “Test” ]

                                                          Scripts:


                                                          Layout Objects: JSON zu XML

                                                          Regular Fields

                                                          Field Name: Table::Eingabe
                                                          Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                          • Top: 132 pt
                                                          • Left: 11 pt
                                                          • Bottom: 597 pt
                                                          • Right: 385 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: Table::Ausgabe
                                                          Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                          • Top: 132 pt
                                                          • Left: 400 pt
                                                          • Bottom: 597 pt
                                                          • Right: 774 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: Table::RootNode
                                                          Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                          • Top: 166 pt
                                                          • Left: 785 pt
                                                          • Bottom: 197 pt
                                                          • Right: 981 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

                                                          Buttons

                                                          Button PropertiesCoordinatesScript/Script Step
                                                            Type:
                                                          • Text: JSON -> XML
                                                          • Top: 211 pt
                                                          • Left: 785 pt
                                                          • Bottom: 248 pt
                                                          • Right: 965 pt
                                                          • Anchoring: Left, Top
                                                          Perform Script [ “JSONzuXML” ]

                                                          Scripts:


                                                          Value Lists

                                                          Value List NameSourceValuesOn Layouts
                                                          optionsCustom
                                                          • ignore errors in xml, put attributs inline, true and false being boolean, make numbers as numbers, include namespaces

                                                          Script Hierarchy

                                                          Checkbox
                                                          Test
                                                          JSONzuXML

                                                          Next Script: [Test]
                                                          Script NameCheckbox
                                                          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 [ $List; Value:Table::Auswahl ]
                                                            • Set Variable [ $Count; Value:ValueCount ( $List) ]
                                                            • Set Variable [ $Result; Value:0 ]
                                                            • If [ $Count > 0 ]
                                                            • Set Variable [ $i; Value:1 ]
                                                            • Loop
                                                            • Set Variable [ $Value; Value:GetValue ($List ; $i ) ]
                                                            • Set Variable [ $Res; Value:Case ( $Value ="ignore errors in xml" ; 1 ; $Value ="put attributs inline" ; 2 ; $Value ="true and false being boolean" ; 4 ; $Value ="make numbers as numbers" ; 8 ; $Value ="include namespaces" ; 16 ; 0 ) ]
                                                            • Set Variable [ $Result; Value:$Result + $Res ]
                                                            • Exit Loop If [ $i ≥ $Count ]
                                                            • Set Variable [ $i; Value:$i+1 ]
                                                            • End Loop
                                                            • End If
                                                            • Exit Script [ 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

                                                                    Previous Script: [Checkbox]Next Script: [JSONzuXML]
                                                                    Script NameTest
                                                                    Run script with full access privilegesOff
                                                                    Include In MenuYes
                                                                    Layouts that use this script
                                                                    Scripts that use this script
                                                                      Script Definition
                                                                      Script Steps
                                                                      • Perform Script [ “Checkbox” ]
                                                                      • Set Variable [ $Option; Value:Get(ScriptResult) ]
                                                                      • Set Variable [ $JSON; Value:MBS("XML.ToJSON"; Table::Eingabe; $Option) ]
                                                                      • Set Field [ Table::Ausgabe; MBS("JSON.Colorize"; MBS("JSON.Format"; $JSON)) ]
                                                                      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: [Test]
                                                                            Script NameJSONzuXML
                                                                            Run script with full access privilegesOff
                                                                            Include In MenuNo
                                                                            Layouts that use this script
                                                                            Scripts that use this script
                                                                              Script Definition
                                                                              Script Steps
                                                                              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: XML and JSON

                                                                                      Used functions: