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

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
Scripts6
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: 128 pt
                                • Left: 138 pt
                                • Bottom: 147 pt
                                • Right: 391 pt
                                • Anchoring: Left and Right, 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: Pass Parameters with Dictionary::NumberField
                                Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                • Top: 151 pt
                                • Left: 138 pt
                                • Bottom: 170 pt
                                • Right: 391 pt
                                • Anchoring: Left and Right, 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: Pass Parameters with Dictionary::DateField
                                Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                • Top: 174 pt
                                • Left: 138 pt
                                • Bottom: 193 pt
                                • Right: 391 pt
                                • Anchoring: Left and Right, 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: Pass Parameters with Dictionary::TimeField
                                Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                • Top: 197 pt
                                • Left: 138 pt
                                • Bottom: 216 pt
                                • Right: 391 pt
                                • Anchoring: Left and Right, 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: Pass Parameters with Dictionary::TimeStampField
                                Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                • Top: 220 pt
                                • Left: 138 pt
                                • Bottom: 239 pt
                                • Right: 391 pt
                                • Anchoring: Left and Right, 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: Pass Parameters with Dictionary::ContainerName
                                Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                • Top: 243 pt
                                • Left: 138 pt
                                • Bottom: 262 pt
                                • Right: 391 pt
                                • Anchoring: Left and Right, 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: Pass Parameters with Dictionary::ContainerField
                                Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                • Top: 266 pt
                                • Left: 138 pt
                                • Bottom: 391 pt
                                • Right: 391 pt
                                • Anchoring: Left and Right, 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

                                Buttons

                                Button PropertiesCoordinatesScript/Script Step
                                  Type:
                                • Text: Set Now
                                • Top: 168 pt
                                • Left: 399 pt
                                • Bottom: 193 pt
                                • Right: 498 pt
                                • Anchoring: Right, Top
                                Perform Script [ “SetDateFields” ]

                                Scripts:


                                Button PropertiesCoordinatesScript/Script Step
                                  Type:
                                • Text: Build and Call via Script
                                • Top: 47 pt
                                • Left: 124 pt
                                • Bottom: 73 pt
                                • Right: 281 pt
                                • Anchoring: Left, Top
                                Perform Script [ “Build Parameters and Call Script1” ]

                                Scripts:


                                Button PropertiesCoordinatesScript/Script Step
                                  Type:
                                • Text: Build and Call via Calculation
                                • Top: 47 pt
                                • Left: 315 pt
                                • Bottom: 73 pt
                                • Right: 498 pt
                                • Anchoring: Left, Top
                                Perform Script [ “Script Called1”; Parameter: MBS( "Dictionary.Create"; "textVariable"; Pass Parameters with Dictionary::TextField; "numberVariable"; Pass Parameters with Dictionary::NumberField; "dateVariable"; Pass Parameters with Dictionary::DateField; "timeVariable"; Pass Parameters with Dictionary::TimeField; "timeStampVariable"; Pass Parameters with Dictionary::TimeStampField; "containerVariable"; Pass Parameters with Dictionary::ContainerField ) /* create dictionary here and define which keys and value it contains. */ ]

                                Scripts:

                                Fields:


                                Button PropertiesCoordinatesScript/Script Step
                                  Type:
                                • Text: Build and Call via Script
                                • Top: 85 pt
                                • Left: 124 pt
                                • Bottom: 111 pt
                                • Right: 281 pt
                                • Anchoring: Left, Top
                                Perform Script [ “Build Parameters and Call Script2” ]

                                Scripts:


                                Button PropertiesCoordinatesScript/Script Step
                                  Type:
                                • Text: Build and Call via Calculation
                                • Top: 85 pt
                                • Left: 315 pt
                                • Bottom: 111 pt
                                • Right: 498 pt
                                • Anchoring: Left, Top
                                Perform Script [ “Script Called2”; 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 Script1
                                Build Parameters and Call Script2
                                Script Called1
                                Script Called2
                                Trace

                                Next Script: [Build Parameters and Call Script1]
                                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: [Build Parameters and Call Script2]
                                          Script NameBuild Parameters and Call Script1
                                          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 with our values to pass
                                            • #
                                            • Set Variable [ $param; Value:MBS( "Dictionary.Create"; "textVariable"; Pass Parameters with Dictionary::TextField; "numberVariable"; Pass Parameters with Dictionary::NumberField; "dateVariable"; Pass Parameters with Dictionary::DateField; "timeVariable"; Pass Parameters with Dictionary::TimeField; "timeStampVariable"; Pass Parameters with Dictionary::TimeStampField; "containerVariable"; Pass Parameters with Dictionary::ContainerField ) /* create dictionary here and define which keys and value it contains. */ ]
                                            • #
                                            • #Call script and pass ID
                                            • #
                                            • Perform Script [ “Script Called1”; 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 Script1]Next Script: [Script Called1]
                                                  Script NameBuild Parameters and Call Script2
                                                  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 Called2”; 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 Script2]Next Script: [Script Called2]
                                                          Script NameScript Called1
                                                          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) ]
                                                          • #comments for MBS variable check
                                                          • #@param $textVariable, $numberVariable, $dateVariable, $timeVariable, $timeStampVariable, $containerVariable
                                                          • Set Variable [ $r; Value:MBS( "Dictionary.SetVariables"; $param ) ]
                                                          • #
                                                          • #now store them in a new record
                                                          • New Record/Request
                                                          • Set Field [ Pass Parameters with Dictionary::TextField; $textVariable ]
                                                          • Set Field [ Pass Parameters with Dictionary::NumberField; $numberVariable ]
                                                          • Set Field [ Pass Parameters with Dictionary::DateField; $dateVariable ]
                                                          • Set Field [ Pass Parameters with Dictionary::TimeField; $timeVariable ]
                                                          • Set Field [ Pass Parameters with Dictionary::TimeStampField; $timeStampVariable ]
                                                          • Set Field [ Pass Parameters with Dictionary::ContainerField; $containerVariable ]
                                                          • 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 Called1]Next Script: [Trace]
                                                                  Script NameScript Called2
                                                                  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 Called2]
                                                                          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

                                                                                            Download example: Pass Parameters with Dictionary

                                                                                            Used functions: