MBS FileMaker Plugin Example Databases

Pass Parameters with Dictionary

All examples are included with download of MBS FileMaker Plugin.

Pass Parameters with Dictionary.fmp12

Overview
Tables1
Relationships0
Layouts1
Scripts4
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
Pass Parameters with Dictionary
7 fields defined, 1 record
Pass Parameters with Dictionary

Fields

Table Name: Pass Parameters with Dictionary - 7 Fields
Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
TextFieldNormal, TextAuto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Repetitions: 1
  • Indexing: None
  • Automatically create indexes as needed
  • Index Language: German
      NumberFieldNormal, NumberAuto-Enter:
      • Allow editing
      Validation:
      • Only during data entry
      Storage:
      • Repetitions: 1
      • Indexing: None
      • Automatically create indexes as needed
      • Index Language: German
          DateFieldNormal, DateAuto-Enter:
          • Allow editing
          Validation:
          • Only during data entry
          Storage:
          • Repetitions: 1
          • Indexing: None
          • Automatically create indexes as needed
          • Index Language: German
              TimeFieldNormal, TimeAuto-Enter:
              • Allow editing
              Validation:
              • Only during data entry
              Storage:
              • Repetitions: 1
              • Indexing: None
              • Automatically create indexes as needed
              • Index Language: German
                  TimeStampFieldNormal, TimestampAuto-Enter:
                  • Allow editing
                  Validation:
                  • Only during data entry
                  Storage:
                  • Repetitions: 1
                  • Indexing: None
                  • Automatically create indexes as needed
                  • Index Language: German
                      ContainerNameCalculated, TextCalculation: Auto-Enter:
                      • Always evaluate
                      Storage:
                      • Repetitions: 1
                      • Indexing: None
                      • Automatically create indexes as needed
                      • Index Language: German
                            ContainerFieldNormal, BinaryAuto-Enter:
                            • Allow editing
                            Validation:
                            • Only during data entry
                            Storage:
                            • Repetitions: 1

                                Layout Objects: Pass Parameters with Dictionary

                                Regular Fields

                                Field Name: Pass Parameters with Dictionary::TextField
                                Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                • Top: 84 pt
                                • Left: 138 pt
                                • Bottom: 98 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: Pass Parameters with Dictionary::NumberField
                                Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                • Top: 102 pt
                                • Left: 138 pt
                                • Bottom: 116 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: Pass Parameters with Dictionary::DateField
                                Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                • Top: 120 pt
                                • Left: 138 pt
                                • Bottom: 134 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: Pass Parameters with Dictionary::TimeField
                                Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                • Top: 138 pt
                                • Left: 138 pt
                                • Bottom: 152 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: Pass Parameters with Dictionary::TimeStampField
                                Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                • Top: 156 pt
                                • Left: 138 pt
                                • Bottom: 170 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: Pass Parameters with Dictionary::ContainerName
                                Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                • Top: 174 pt
                                • Left: 138 pt
                                • Bottom: 188 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: Pass Parameters with Dictionary::ContainerField
                                Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                • Top: 192 pt
                                • Left: 138 pt
                                • Bottom: 317 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
                                No

                                Group Buttons

                                Button PropertiesCoordinatesScript/Script Step
                                  Type:
                                • Text: Set to now
                                  Additional Properties:
                                • Change to hand cursor over button
                                • Rectangular
                                • Top: 114 pt
                                • Left: 414 pt
                                • Bottom: 139 pt
                                • Right: 487 pt
                                • Anchoring: Left, Top
                                Perform Script [ “SetDateFields” ]

                                Scripts:


                                Button PropertiesCoordinatesScript/Script Step
                                  Type:
                                • Text: Build and Call via Script
                                  Additional Properties:
                                • Change to hand cursor over button
                                • Rectangular
                                • Top: 48 pt
                                • Left: 138 pt
                                • Bottom: 74 pt
                                • Right: 295 pt
                                • Anchoring: Left, Top
                                Perform Script [ “Build Parameters and Call Script” ]

                                Scripts:


                                Button PropertiesCoordinatesScript/Script Step
                                  Type:
                                • Text: Build and Call via Calculation
                                  Additional Properties:
                                • Change to hand cursor over button
                                • Rectangular
                                • Top: 48 pt
                                • Left: 323 pt
                                • Bottom: 74 pt
                                • Right: 506 pt
                                • Anchoring: Left, Top
                                Perform Script [ “Script Called”; Parameter: Let ( [ /* Create new Dictionary */ param = MBS( "Dictionary.Create" ); /* Fill in parameters */ r1 = MBS( "Dictionary.SetValueForKey"; param; "text"; Pass Parameters with Dictionary::TextField ); r2 = MBS( "Dictionary.SetValueForKey"; param; "number"; Pass Parameters with Dictionary::NumberField); r3 = MBS( "Dictionary.SetValueForKey"; param; "date"; Pass Parameters with Dictionary::DateField); r4 = MBS( "Dictionary.SetValueForKey"; param; "time"; Pass Parameters with Dictionary::TimeField); r5 = MBS( "Dictionary.SetValueForKey"; param; "timestamp"; Pass Parameters with Dictionary::TimeStampField); r6 = MBS( "Dictionary.SetValueForKey"; param; "container"; Pass Parameters with Dictionary::ContainerField) /* return dictionary */ ] ; param ) ]

                                Scripts:

                                Fields:


                                Script Hierarchy

                                SetDateFields
                                Build Parameters and Call Script
                                Script Called
                                Trace

                                Next Script: [Build Parameters and Call Script]
                                Script NameSetDateFields
                                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 [ $d; Value:Get(CurrentHostTimestamp) ]
                                  • Set Field [ Pass Parameters with Dictionary::DateField; $d ]
                                  • Set Field [ Pass Parameters with Dictionary::TimeField; $d ]
                                  • Set Field [ Pass Parameters with Dictionary::TimeStampField; $d ]
                                  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: [SetDateFields]Next Script: [Script Called]
                                          Script NameBuild Parameters and Call Script
                                          Run script with full access privilegesOff
                                          Include In MenuYes
                                          Layouts that use this script
                                          Scripts that use this script
                                            Script Definition
                                            Script Steps
                                            • #
                                            • #
                                            • #Create new Dictionary
                                            • #
                                            • Set Variable [ $param; Value:MBS( "Dictionary.Create" ) ]
                                            • #
                                            • #Fill in parameters
                                            • #
                                            • Set Variable [ $r; Value:MBS( "Dictionary.SetValueForKey"; $param; "text"; Pass Parameters with Dictionary::TextField ) ]
                                            • Set Variable [ $r; Value:MBS( "Dictionary.SetValueForKey"; $param; "number"; Pass Parameters with Dictionary::NumberField) ]
                                            • Set Variable [ $r; Value:MBS( "Dictionary.SetValueForKey"; $param; "date"; Pass Parameters with Dictionary::DateField) ]
                                            • Set Variable [ $r; Value:MBS( "Dictionary.SetValueForKey"; $param; "time"; Pass Parameters with Dictionary::TimeField) ]
                                            • Set Variable [ $r; Value:MBS( "Dictionary.SetValueForKey"; $param; "timestamp"; Pass Parameters with Dictionary::TimeStampField) ]
                                            • Set Variable [ $r; Value:MBS( "Dictionary.SetValueForKey"; $param; "container"; Pass Parameters with Dictionary::ContainerField) ]
                                            • #
                                            • #Call script and pass ID
                                            • #
                                            • Perform Script [ “Script Called”; Parameter: $param ]
                                            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 Parameters and Call Script]Next Script: [Trace]
                                                  Script NameScript Called
                                                  Run script with full access privilegesOff
                                                  Include In MenuYes
                                                  Layouts that use this script
                                                  Scripts that use this script
                                                  Script Definition
                                                  Script Steps
                                                  • #
                                                  • #we got parameters
                                                  • Set Variable [ $param; Value:Get(ScriptParameter) ]
                                                  • #
                                                  • #check some functions
                                                  • // Set Variable [ $count; Value:MBS("Dictionary.Count"; $Param) ]
                                                  • // Set Variable [ $keys; Value:MBS("Dictionary.Keys"; $Param) ]
                                                  • // Set Variable [ $key0; Value:MBS("Dictionary.KeyAtIndex"; $Param; 0) ]
                                                  • // Set Variable [ $key1; Value:MBS("Dictionary.KeyAtIndex"; $Param; 1) ]
                                                  • // Set Variable [ $hasText; Value:MBS("Dictionary.HasKey"; $Param; "text") ]
                                                  • // Set Variable [ $hasFun; Value:MBS("Dictionary.HasKey"; $Param; "fun") ]
                                                  • #now store them in a new record
                                                  • New Record/Request
                                                  • Set Field [ Pass Parameters with Dictionary::TextField; MBS( "Dictionary.ValueForKey"; $param; "text" ) ]
                                                  • Set Field [ Pass Parameters with Dictionary::NumberField; MBS( "Dictionary.ValueForKey"; $param; "number" ) ]
                                                  • Set Field [ Pass Parameters with Dictionary::DateField; MBS( "Dictionary.ValueForKey"; $param; "date" ) ]
                                                  • Set Field [ Pass Parameters with Dictionary::TimeField; MBS( "Dictionary.ValueForKey"; $param; "time" ) ]
                                                  • Set Field [ Pass Parameters with Dictionary::TimeStampField; MBS( "Dictionary.ValueForKey"; $param; "timestamp" ) ]
                                                  • Set Field [ Pass Parameters with Dictionary::ContainerField; MBS( "Dictionary.ValueForKey"; $param; "container" ) ]
                                                  • Commit Records/Requests [ Skip data entry validation; No dialog ]
                                                  • #and release
                                                  • Set Variable [ $r; Value:MBS("Dictionary.Release"; $param) ]
                                                  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: [Script Called]
                                                          Script NameTrace
                                                          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 [ $r; Value:MBS("Trace") ]
                                                              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

                                                                            Used functions:




                                                                            Links
                                                                            MBS Xojo Chart Plugins