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
Tables 1
Relationships 0
Layouts 1
Scripts 6
Value Lists 0
Custom Functions 0
Custom Menus 33
File Options
Default custom menu set [Standard FileMaker Menus]
Default theme Minimalistisch
When opening file
Minimum allowed version 12.0
Login using Account Name; Account= Admin
Allow user to save password On
Require iOS passcode Off
Show Sign-in fields Off
Switch to layout Off
Hide all toolbars Off
Script triggers
OnFirstWindowOpen Off
OnLastWindowClose Off
OnWindowOpen Off
OnWindowClose Off
OnFileAVPlayerChange Off
OnWindowTransaction Off
Thumbnail Settings
Generate Thumbnails On; Temporary

 

Tables

Table Name
Statistics
Comments
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 Name Type Options Comments On Layouts In Relationships In Scripts In Value Lists
TextField Normal, Text Auto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Repetitions: 1
  • Indexing: None
  • Automatically create indexes as needed
  • Index Language: German
      NumberField Normal, Number Auto-Enter:
      • Allow editing
      Validation:
      • Only during data entry
      Storage:
      • Repetitions: 1
      • Indexing: None
      • Automatically create indexes as needed
      • Index Language: German
          DateField Normal, Date Auto-Enter:
          • Allow editing
          Validation:
          • Only during data entry
          Storage:
          • Repetitions: 1
          • Indexing: None
          • Automatically create indexes as needed
          • Index Language: German
              TimeField Normal, Time Auto-Enter:
              • Allow editing
              Validation:
              • Only during data entry
              Storage:
              • Repetitions: 1
              • Indexing: None
              • Automatically create indexes as needed
              • Index Language: German
                  TimeStampField Normal, Timestamp Auto-Enter:
                  • Allow editing
                  Validation:
                  • Only during data entry
                  Storage:
                  • Repetitions: 1
                  • Indexing: None
                  • Automatically create indexes as needed
                  • Index Language: German
                      ContainerName Calculated, Text Calculation: Auto-Enter:
                      • Always evaluate
                      Storage:
                      • Repetitions: 1
                      • Indexing: None
                      • Automatically create indexes as needed
                      • Index Language: German
                            ContainerField Normal, Binary Auto-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 Properties Coordinates Field Format Field Behavior Quick 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 Properties Coordinates Field Format Field Behavior Quick 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 Properties Coordinates Field Format Field Behavior Quick 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 Properties Coordinates Field Format Field Behavior Quick 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 Properties Coordinates Field Format Field Behavior Quick 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 Properties Coordinates Field Format Field Behavior Quick 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 Properties Coordinates Field Format Field Behavior Quick 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 Properties Coordinates Script/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 Properties Coordinates Script/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 Properties Coordinates Script/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 Properties Coordinates Script/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 Properties Coordinates Script/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 Name SetDateFields
                                Run script with full access privileges Off
                                Siri Shortcut Visible Off
                                Include In Menu Yes
                                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 Name Build Parameters and Call Script1
                                          Run script with full access privileges Off
                                          Siri Shortcut Visible Off
                                          Include In Menu Yes
                                          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 Name Build Parameters and Call Script2
                                                  Run script with full access privileges Off
                                                  Siri Shortcut Visible Off
                                                  Include In Menu Yes
                                                  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 Name Script Called1
                                                          Run script with full access privileges Off
                                                          Siri Shortcut Visible Off
                                                          Include In Menu Yes
                                                          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 Name Script Called2
                                                                  Run script with full access privileges Off
                                                                  Siri Shortcut Visible Off
                                                                  Include In Menu Yes
                                                                  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 Name Trace
                                                                          Run script with full access privileges Off
                                                                          Siri Shortcut Visible Off
                                                                          Include In Menu Yes
                                                                          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: