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

MBS FileMaker Plugin Example Databases

FileMaker Custom Functions

All examples are included with download of MBS FileMaker Plugin.

FileMaker Custom Functions.fmp12

Overview
Tables 2
Relationships 1
Layouts 2
Scripts 7
Value Lists 1
Custom Functions 0
Custom Menus 24
File Options
Default custom menu set [Standard FileMaker Menus]
Default theme Apex Blau
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 Script: Start Script
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
CustomFunctions
11 fields defined, 10 records
CustomFunctions
CustomFunctionParameters
5 fields defined, 19 records
CustomFunctionParameters

Fields

Table Name: CustomFunctions - 11 Fields
Field Name Type Options Comments On Layouts In Relationships In Scripts In Value Lists
ID Normal, Number Auto-Enter:
  • Allow editing
  • Serial: Generate: On creation, Next value: 16, Increment: 1
Validation:
  • Only during data entry
  • Unique
Storage:
  • Repetitions: 1
  • Indexing: All
  • Index Language: German
        Name Normal, Text Auto-Enter:
        • Allow editing
        Validation:
        • Only during data entry
        Storage:
        • Repetitions: 1
        • Indexing: None
        • Automatically create indexes as needed
        • Index Language: German
            Declaration Normal, Text Auto-Enter: Validation:
            • Only during data entry
            Storage:
            • Repetitions: 1
            • Indexing: None
            • Automatically create indexes as needed
            • Index Language: German
                Description Normal, Text Auto-Enter:
                • Allow editing
                Validation:
                • Only during data entry
                Storage:
                • Repetitions: 1
                • Indexing: None
                • Automatically create indexes as needed
                • Index Language: German
                      Body Normal, Text Auto-Enter:
                      • Allow editing
                      Validation:
                      • Only during data entry
                      Storage:
                      • Repetitions: 1
                      • Indexing: None
                      • Automatically create indexes as needed
                      • Index Language: German
                          Result Normal, Text Auto-Enter:
                          • Allow editing
                          Validation:
                          • Only during data entry
                          Storage:
                          • Repetitions: 1
                          • Indexing: None
                          • Automatically create indexes as needed
                          • Index Language: German
                              SampleCall Normal, Text Auto-Enter: Validation:
                              • Only during data entry
                              Storage:
                              • Repetitions: 1
                              • Indexing: None
                              • Automatically create indexes as needed
                              • Index Language: German
                                    FunctionID Normal, Number Auto-Enter:
                                    • Allow editing
                                    • Serial: Generate: On creation, Next value: 13, Increment: 1
                                    Validation:
                                    • Only during data entry
                                    Storage:
                                    • Repetitions: 1
                                    • Indexing: None
                                    • Automatically create indexes as needed
                                    • Index Language: German
                                        MinParameters Normal, Number Auto-Enter:
                                        • Allow editing
                                        Validation:
                                        • Only during data entry
                                        Storage:
                                        • Repetitions: 1
                                        • Indexing: None
                                        • Automatically create indexes as needed
                                        • Index Language: German
                                            MaxParameters Normal, Number Auto-Enter:
                                            • Allow editing
                                            Validation:
                                            • Only during data entry
                                            Storage:
                                            • Repetitions: 1
                                            • Indexing: None
                                            • Automatically create indexes as needed
                                            • Index Language: German
                                                Type Normal, Text Auto-Enter:
                                                • Allow editing
                                                Validation:
                                                • Only during data entry
                                                Storage:
                                                • Repetitions: 1
                                                • Indexing: None
                                                • Automatically create indexes as needed
                                                • Index Language: German

                                                    Table Name: CustomFunctionParameters - 5 Fields
                                                    Field Name Type Options Comments On Layouts In Relationships In Scripts In Value Lists
                                                    ID Normal, Number Auto-Enter:
                                                    • Allow editing
                                                    • Serial: Generate: On creation, Next value: 21, Increment: 1
                                                    Validation:
                                                    • Only during data entry
                                                    • Unique
                                                    Storage:
                                                    • Repetitions: 1
                                                    • Indexing: All
                                                    • Index Language: German
                                                        Name Normal, Text Auto-Enter:
                                                        • Allow editing
                                                        Validation:
                                                        • Only during data entry
                                                        Storage:
                                                        • Repetitions: 1
                                                        • Indexing: None
                                                        • Automatically create indexes as needed
                                                        • Index Language: German
                                                            Description Normal, Text Auto-Enter:
                                                            • Allow editing
                                                            Validation:
                                                            • Only during data entry
                                                            Storage:
                                                            • Repetitions: 1
                                                            • Indexing: None
                                                            • Automatically create indexes as needed
                                                            • Index Language: German
                                                                  FunctionID Normal, Number Auto-Enter:
                                                                  • Allow editing
                                                                  Validation:
                                                                  • Only during data entry
                                                                  Storage:
                                                                  • Repetitions: 1
                                                                  • Indexing: All
                                                                  • Index Language: German
                                                                      Value Normal, Text Auto-Enter:
                                                                      • Allow editing
                                                                      Validation:
                                                                      • Only during data entry
                                                                      Storage:
                                                                      • Repetitions: 1
                                                                      • Indexing: None
                                                                      • Automatically create indexes as needed
                                                                      • Index Language: German

                                                                          Layout Objects: CustomFunctions

                                                                          Regular Fields

                                                                          Field Name: CustomFunctions::Name
                                                                          Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                          • Top: 126 pt
                                                                          • Left: 137 pt
                                                                          • Bottom: 157 pt
                                                                          • Right: 736 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: CustomFunctions::Declaration
                                                                          Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                          • Top: 161 pt
                                                                          • Left: 137 pt
                                                                          • Bottom: 192 pt
                                                                          • Right: 736 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: CustomFunctions::Description
                                                                          Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                          • Top: 196 pt
                                                                          • Left: 137 pt
                                                                          • Bottom: 227 pt
                                                                          • Right: 736 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: CustomFunctions::Body
                                                                          Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                          • Top: 451 pt
                                                                          • Left: 138 pt
                                                                          • Bottom: 757 pt
                                                                          • Right: 968 pt
                                                                          • Anchoring: Left and Right, Top and Bottom
                                                                          Field Format:
                                                                          • Edit Box
                                                                          Field Behavior:
                                                                          • Allow field to be entered: In Find mode, In Browse mode
                                                                          • Disable visual spell-checking
                                                                          • Touch keyboard type: Default for Data Type
                                                                          • Go to next field using: Tab key
                                                                          Yes

                                                                          Field Name: CustomFunctionParameters::Name
                                                                          Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                          • Top: 250 pt
                                                                          • Left: 145 pt
                                                                          • Bottom: 281 pt
                                                                          • Right: 394 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: CustomFunctionParameters::Description
                                                                          Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                          • Top: 250 pt
                                                                          • Left: 398 pt
                                                                          • Bottom: 281 pt
                                                                          • Right: 706 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: CustomFunctionParameters::Value
                                                                          Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                          • Top: 250 pt
                                                                          • Left: 711 pt
                                                                          • Bottom: 281 pt
                                                                          • Right: 960 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: CustomFunctions::SampleCall
                                                                          Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                          • Top: 849 pt
                                                                          • Left: 138 pt
                                                                          • Bottom: 880 pt
                                                                          • Right: 968 pt
                                                                          • Anchoring: Left and Right, Bottom
                                                                          Field Format:
                                                                          • Edit Box
                                                                          Field Behavior:
                                                                          • Allow field to be entered: In Find mode, In Browse mode
                                                                          • Touch keyboard type: Default for Data Type
                                                                          • Go to next field using: Tab key
                                                                          Yes

                                                                          Field Name: CustomFunctions::Result
                                                                          Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                          • Top: 766 pt
                                                                          • Left: 140 pt
                                                                          • Bottom: 797 pt
                                                                          • Right: 968 pt
                                                                          • Anchoring: Left, Bottom
                                                                          Field Format:
                                                                          • Edit Box
                                                                          Field Behavior:
                                                                          • Allow field to be entered: In Find mode, In Browse mode
                                                                          • Touch keyboard type: Default for Data Type
                                                                          • Go to next field using: Tab key
                                                                          Yes

                                                                          Field Name: CustomFunctions::FunctionID
                                                                          Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                          • Top: 126 pt
                                                                          • Left: 867 pt
                                                                          • Bottom: 157 pt
                                                                          • Right: 968 pt
                                                                          • Anchoring: 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: CustomFunctions::MinParameters
                                                                          Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                          • Top: 161 pt
                                                                          • Left: 867 pt
                                                                          • Bottom: 192 pt
                                                                          • Right: 968 pt
                                                                          • Anchoring: 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: CustomFunctions::MaxParameters
                                                                          Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                          • Top: 196 pt
                                                                          • Left: 867 pt
                                                                          • Bottom: 227 pt
                                                                          • Right: 968 pt
                                                                          • Anchoring: 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: CustomFunctions::Type
                                                                          Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                          • Top: 806 pt
                                                                          • Left: 140 pt
                                                                          • Bottom: 837 pt
                                                                          • Right: 279 pt
                                                                          • Anchoring: Left, Bottom
                                                                          Field Format:
                                                                          • Pop-up Menu
                                                                          • Display values from: Types
                                                                          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 Properties Coordinates Script/Script Step
                                                                            Type:
                                                                          • Text: Register and Try
                                                                          • Top: 798 pt
                                                                          • Left: 813 pt
                                                                          • Bottom: 838 pt
                                                                          • Right: 968 pt
                                                                          • Anchoring: Right, Bottom
                                                                          Perform Script [ “Test Function” ]

                                                                          Scripts:


                                                                          Button Properties Coordinates Script/Script Step
                                                                            Type:
                                                                          • Text: Register Function
                                                                          • Top: 798 pt
                                                                          • Left: 639 pt
                                                                          • Bottom: 838 pt
                                                                          • Right: 794 pt
                                                                          • Anchoring: Right, Bottom
                                                                          Perform Script [ “Register Function” ]

                                                                          Scripts:


                                                                          Button Properties Coordinates Script/Script Step
                                                                            Type:
                                                                          • Text: Check
                                                                          • Top: 798 pt
                                                                          • Left: 465 pt
                                                                          • Bottom: 838 pt
                                                                          • Right: 620 pt
                                                                          • Anchoring: Right, Bottom
                                                                          Perform Script [ “CheckError” ]

                                                                          Scripts:


                                                                          Button Properties Coordinates Script/Script Step
                                                                            Type:
                                                                          • Text: Format
                                                                          • Top: 798 pt
                                                                          • Left: 291 pt
                                                                          • Bottom: 838 pt
                                                                          • Right: 446 pt
                                                                          • Anchoring: Right, Bottom
                                                                          Perform Script [ “Format” ]

                                                                          Scripts:


                                                                          Portals

                                                                          Portal Properties Coordinates Fields Options
                                                                          • Top: 245 pt
                                                                          • Left: 140 pt
                                                                          • Bottom: 442 pt
                                                                          • Right: 968 pt
                                                                          • Anchoring: Left, Top
                                                                          Field Objects
                                                                          • Sort records: Off
                                                                          • Filter calculation: None
                                                                          • Initial Row: 1
                                                                          • Number of Rows: 5
                                                                          • Allow deletion of portal records

                                                                          Layout Objects: CustomFunctionParameters

                                                                          Regular Fields

                                                                          Field Name: CustomFunctionParameters::ID
                                                                          Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                          • Top: 114 pt
                                                                          • Left: 138 pt
                                                                          • Bottom: 145 pt
                                                                          • Right: 217 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: CustomFunctionParameters::Name
                                                                          Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                          • Top: 155 pt
                                                                          • Left: 138 pt
                                                                          • Bottom: 186 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: Default for Data Type
                                                                          • Go to next field using: Tab key
                                                                          Yes

                                                                          Field Name: CustomFunctionParameters::Description
                                                                          Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                          • Top: 190 pt
                                                                          • Left: 138 pt
                                                                          • Bottom: 221 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: Default for Data Type
                                                                          • Go to next field using: Tab key
                                                                          Yes

                                                                          Field Name: CustomFunctionParameters::FunctionID
                                                                          Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                          • Top: 225 pt
                                                                          • Left: 138 pt
                                                                          • Bottom: 256 pt
                                                                          • Right: 217 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: CustomFunctionParameters::Value
                                                                          Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                          • Top: 260 pt
                                                                          • Left: 138 pt
                                                                          • Bottom: 291 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: Default for Data Type
                                                                          • Go to next field using: Tab key
                                                                          Yes

                                                                          Value Lists

                                                                          Value List Name Source Values On Layouts
                                                                          Types Custom
                                                                          • FileMaker, JavaScript, JavaScript with globals, WebKit, WebKit with globals

                                                                          Script Hierarchy

                                                                          Start Script
                                                                          RefreshDeclaration
                                                                          Register Function
                                                                          Test Function
                                                                          Format
                                                                          CheckError
                                                                          Clear

                                                                          Next Script: [RefreshDeclaration]
                                                                          Script Name Start Script
                                                                          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
                                                                              • If [ IsEmpty ( MBS("Plugin.CustomFunctionNames") ) ]
                                                                              • #register all functions
                                                                              • Go to Layout [ “CustomFunctions” (CustomFunctions) ]
                                                                              • #you could do a search here to only find the functions you need
                                                                              • Go to Record/Request/Page [ First ]
                                                                              • Loop [ Flush: Always ]
                                                                              • Perform Script [ “Register Function” ]
                                                                              • Go to Record/Request/Page [ Next; Exit after last ]
                                                                              • End Loop
                                                                              • Go to Record/Request/Page [ First ]
                                                                              • End If
                                                                              • #clear result fields
                                                                              • Replace Field Contents [ CustomFunctions::Result; Replace with calculation: "" ] [ No dialog ]
                                                                              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: [Start Script] Next Script: [Register Function]
                                                                                  Script Name RefreshDeclaration
                                                                                  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
                                                                                      • #assign value to itself to trigger calculation for declaration field
                                                                                      • Set Field [ CustomFunctions::Name; CustomFunctions::Name ]
                                                                                      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: [RefreshDeclaration] Next Script: [Test Function]
                                                                                              Script Name Register Function
                                                                                              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
                                                                                              • #Register one function. Replacing older one with same name
                                                                                              • If [ CustomFunctions::Type = "JavaScript" ]
                                                                                              • Set Variable [ $Flags; Value:1 ]
                                                                                              • Else If [ CustomFunctions::Type = "JavaScript with globals" ]
                                                                                              • Set Variable [ $Flags; Value:1 + 4 ]
                                                                                              • Else If [ CustomFunctions::Type = "WebKit" ]
                                                                                              • Set Variable [ $Flags; Value:2 ]
                                                                                              • Else If [ CustomFunctions::Type = "WebKit with globals" ]
                                                                                              • Set Variable [ $Flags; Value:2 + 4 ]
                                                                                              • Else [ ]
                                                                                              • Set Variable [ $Flags; Value:0 ]
                                                                                              • End If
                                                                                              • Set Variable [ $r; Value:MBS("Plugin.RegisterFunction"; CustomFunctions::FunctionID; CustomFunctions::Name; CustomFunctions::Declaration; CustomFunctions::Body; CustomFunctions::MinParameters; CustomFunctions::MaxParameters; $Flags) ]
                                                                                              • If [ MBS("IsError") ]
                                                                                              • Show Custom Dialog [ Title: "Failed to add function."; Message: $r; Default Button: “OK”, Commit: “Yes” ]
                                                                                              • End If
                                                                                              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: [Register Function] Next Script: [Format]
                                                                                                      Script Name Test Function
                                                                                                      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
                                                                                                        • #Register function
                                                                                                        • Perform Script [ “Register Function” ]
                                                                                                        • Set Variable [ $ParameterCount; Value:ValueCount ( List ( CustomFunctionParameters::ID ) ) ]
                                                                                                        • Set Variable [ $expression; Value:CustomFunctions::Name & If($ParameterCount ≥ 1; "(") & If($ParameterCount ≥ 1; Quote(GetNthRecord ( CustomFunctionParameters::Value ; 1))) & If($ParameterCount ≥ 2; "; " & Quote(GetNthRecord ( CustomFunctionParameters::Value ; 2))) & If($ParameterCount ≥ 3; "; " & Quote(GetNthRecord ( CustomFunctionParameters::Value ; 3))) & If($ParameterCount ≥ 4; "; " & Quote(GetNthRecord ( CustomFunctionParameters::Value ; 4))) & If($ParameterCount ≥ 5; "; " & Quote(GetNthRecord ( CustomFunctionParameters::Value ; 5))) & If($ParameterCount ≥ 6; "; " & Quote(GetNthRecord ( CustomFunctionParameters::Value ; 6))) & If($ParameterCount ≥ 7; "; " & Quote(GetNthRecord ( CustomFunctionParameters::Value ; 7))) & If($ParameterCount ≥ 8; "; " & Quote(GetNthRecord ( CustomFunctionParameters::Value ; 8))) & If($ParameterCount ≥ 9; "; " & Quote(GetNthRecord ( CustomFunctionParameters::Value ; 9))) & If($ParameterCount ≥ 1; ")") ]
                                                                                                        • Set Variable [ $r; Value:Evaluate($expression) ]
                                                                                                        • Set Field [ CustomFunctions::Result; $r ]
                                                                                                        • If [ MBS("ISError") ]
                                                                                                        • Show Custom Dialog [ Title: "Result"; Message: $r & ¶ & $expression; Default Button: “OK”, Commit: “Yes” ]
                                                                                                        • End If
                                                                                                        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 Function] Next Script: [CheckError]
                                                                                                              Script Name Format
                                                                                                              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("SyntaxColoring.FormatCalculation"; CustomFunctions::Body) ]
                                                                                                                • If [ MBS("IsError") ]
                                                                                                                • Show Custom Dialog [ Title: "Failed to format"; Message: $r; Default Button: “OK”, Commit: “Yes” ]
                                                                                                                • Else [ ]
                                                                                                                • #add colors
                                                                                                                • Set Variable [ $f; Value:MBS("SyntaxColoring.Format"; $r) ]
                                                                                                                • If [ MBS("IsError") ]
                                                                                                                • Set Field [ CustomFunctions::Body; $r ]
                                                                                                                • Else [ ]
                                                                                                                • Set Field [ CustomFunctions::Body; TextSize ( $f ; 16 ) ]
                                                                                                                • End If
                                                                                                                • End If
                                                                                                                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: [Format] Next Script: [Clear]
                                                                                                                        Script Name CheckError
                                                                                                                        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 Error Capture [ On ]
                                                                                                                          • Set Variable [ $liste; Value:List ( CustomFunctionParameters::Name ) ]
                                                                                                                          • If [ ValueCount ( $liste ) = 0 ]
                                                                                                                          • Set Variable [ $body; Value:CustomFunctions::Body ]
                                                                                                                          • Else [ ]
                                                                                                                          • Set Variable [ $body; Value:"Let([" & ¶ & Substitute($liste; ¶; " = 0;¶") & " = 0;" & ¶ & ¶ & "r = " & ¶ & CustomFunctions::Body & ¶ & "]; r)" ]
                                                                                                                          • End If
                                                                                                                          • Set Variable [ $expression; Value:"If(false; Let(r=" & $body & "¶;0))" ]
                                                                                                                          • Set Variable [ $e; Value:EvaluationError(Evaluate($expression)) ]
                                                                                                                          • Set Field [ CustomFunctions::Result; If($e = 0; "No Error"; "Error " & $e & ": " & MBS("FM.ErrorMessage"; $e)) ]
                                                                                                                          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: [CheckError]
                                                                                                                                  Script Name Clear
                                                                                                                                  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
                                                                                                                                      • Replace Field Contents [ CustomFunctions::Result; Replace with calculation: "" ] [ No dialog ]
                                                                                                                                      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: FileMaker Custom Functions

                                                                                                                                              Used functions: