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

MBS FileMaker Plugin Example Databases

AWS SNS SMS Send

All examples are included with download of MBS FileMaker Plugin.

AWS SNS SMS Send.fmp12

Overview
Tables 1
Relationships 0
Layouts 1
Scripts 2
Value Lists 0
Custom Functions 1
Custom Menus 33
File Options
Default custom menu set [Standard FileMaker Menus]
Default theme Minimalist
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
CURL Test
9 fields defined, 1 record
CURL Test

Fields

Table Name: CURL Test - 9 Fields
Field Name Type Options Comments On Layouts In Relationships In Scripts In Value Lists
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
      debug Normal, Text Auto-Enter:
      • Allow editing
      Validation:
      • Only during data entry
      Storage:
      • Repetitions: 1
      • Indexing: None
      • Automatically create indexes as needed
      • Index Language: German
          phoneNumber Normal, Text Auto-Enter:
          • Allow editing
          Validation:
          • Only during data entry
          Storage:
          • Repetitions: 1
          • Indexing: None
          • Automatically create indexes as needed
          • Index Language: German
              message Normal, Text Auto-Enter:
              • Allow editing
              Validation:
              • Only during data entry
              Storage:
              • Repetitions: 1
              • Indexing: None
              • Automatically create indexes as needed
              • Index Language: German
                  region Normal, Text Auto-Enter:
                  • Allow editing
                  Validation:
                  • Only during data entry
                  Storage:
                  • Repetitions: 1
                  • Indexing: None
                  • Automatically create indexes as needed
                  • Index Language: German
                      AWS_access_key Normal, Text Auto-Enter:
                      • Allow editing
                      Validation:
                      • Only during data entry
                      Storage:
                      • Repetitions: 1
                      • Indexing: None
                      • Automatically create indexes as needed
                      • Index Language: German
                          AWS_secret_key Normal, Text Auto-Enter:
                          • Allow editing
                          Validation:
                          • Only during data entry
                          Storage:
                          • Repetitions: 1
                          • Indexing: None
                          • Automatically create indexes as needed
                          • Index Language: German
                              hosted_php_crypt_HMAC Normal, Text Auto-Enter:
                              • Allow editing
                              Validation:
                              • Only during data entry
                              Storage:
                              • Repetitions: 1
                              • Indexing: None
                              • Automatically create indexes as needed
                              • Index Language: German
                                      Input 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: CURL Test

                                          Regular Fields

                                          Field Name: CURL Test::Result
                                          Field Properties Coordinates Field Format Field Behavior Quick Find
                                          • Top: 189 pt
                                          • Left: 549 pt
                                          • Bottom: 485 pt
                                          • Right: 862 pt
                                          • Anchoring: Left, Top
                                          Field Format:
                                          • Edit Box
                                          Field Behavior:
                                          • Allow field to be entered: In Find mode, In Browse mode
                                          • Touch keyboard type: System Default
                                          • Go to next field using: Tab key
                                          Yes

                                          Field Name: CURL Test::phoneNumber
                                          Field Properties Coordinates Field Format Field Behavior Quick Find
                                          • Top: 55 pt
                                          • Left: 134 pt
                                          • Bottom: 74 pt
                                          • Right: 387 pt
                                          • Anchoring: Left, Top
                                          Field Format:
                                          • Edit Box
                                          Field Behavior:
                                          • Allow field to be entered: In Find mode, In Browse mode
                                          • Touch keyboard type: System Default
                                          • Go to next field using: Tab key
                                          Yes

                                          Field Name: CURL Test::message
                                          Field Properties Coordinates Field Format Field Behavior Quick Find
                                          • Top: 91 pt
                                          • Left: 134 pt
                                          • Bottom: 163 pt
                                          • Right: 387 pt
                                          • Anchoring: Left, Top
                                          Field Format:
                                          • Edit Box
                                          Field Behavior:
                                          • Allow field to be entered: In Find mode, In Browse mode
                                          • Touch keyboard type: System Default
                                          • Go to next field using: Tab key
                                          Yes

                                          Field Name: CURL Test::debug
                                          Field Properties Coordinates Field Format Field Behavior Quick Find
                                          • Top: 515 pt
                                          • Left: 134 pt
                                          • Bottom: 864 pt
                                          • Right: 841 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: CURL Test::Input
                                          Field Properties Coordinates Field Format Field Behavior Quick Find
                                          • Top: 421 pt
                                          • Left: 134 pt
                                          • Bottom: 505 pt
                                          • Right: 387 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: CURL Test::region
                                          Field Properties Coordinates Field Format Field Behavior Quick Find
                                          • Top: 256 pt
                                          • Left: 134 pt
                                          • Bottom: 275 pt
                                          • Right: 387 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: CURL Test::AWS_access_key
                                          Field Properties Coordinates Field Format Field Behavior Quick Find
                                          • Top: 279 pt
                                          • Left: 134 pt
                                          • Bottom: 298 pt
                                          • Right: 387 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: CURL Test::AWS_secret_key
                                          Field Properties Coordinates Field Format Field Behavior Quick Find
                                          • Top: 302 pt
                                          • Left: 134 pt
                                          • Bottom: 321 pt
                                          • Right: 387 pt
                                          • Anchoring: Left, Top
                                          Field Format:
                                          • Edit Box
                                          Field Behavior:
                                          • Allow field to be entered: In Find mode, In Browse mode
                                          • Touch keyboard type: Default for Data Type
                                          • Go to next field using: Tab key
                                          Yes

                                          Buttons

                                          Button Properties Coordinates Script/Script Step
                                            Type:
                                          • Text: Send SMS
                                            Additional Properties:
                                          • Change to hand cursor over button
                                          • Top: 49 pt
                                          • Left: 403 pt
                                          • Bottom: 74 pt
                                          • Right: 522 pt
                                          • Anchoring: Left, Top
                                          Perform Script [ “Send SMS” ]

                                          Scripts:


                                          Button Properties Coordinates Script/Script Step
                                            Type:
                                          • Text: Clear Result
                                            Additional Properties:
                                          • Change to hand cursor over button
                                          • Top: 149 pt
                                          • Left: 784 pt
                                          • Bottom: 174 pt
                                          • Right: 862 pt
                                          • Anchoring: Left, Top
                                          Perform Script [ “Clear” ]

                                          Scripts:


                                          Script Hierarchy

                                          Send SMS
                                          Clear

                                          Next Script: [Clear]
                                          Script Name Send SMS
                                          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 [ $$Version; Value:MBS( "Version" ) ]
                                            • Set Use System Formats [ On ]
                                            • #1. Set AWS and SNS Configuration
                                            • Set Variable [ $$PhoneNumber; Value:Filter ( CURL Test::phoneNumber ; "+0123456789" ) ]
                                            • Set Variable [ $$Message; Value:CURL Test::message ]
                                            • Set Variable [ $$AWSAccessKey; Value:CURL Test::AWS_access_key ]
                                            • Set Variable [ $$AWSSecretKey; Value:CURL Test::AWS_secret_key ]
                                            • Set Variable [ $$AWSRegion; Value:CURL Test::region ]
                                            • #2. Set Date and Timestamp
                                            • Set Variable [ $$cTimeStamp; Value:Get(CurrentTimestamp) ]
                                            • Set Variable [ $$Date; Value:Let([ a = $$cTimeStamp ]; Year ( a ) & Right ( "0" & Month ( a ) ; 2 ) & Right ( "0" & Day ( a ) ; 2 ) ) ]
                                            • Set Variable [ $$Timestamp; Value:Let([ a = $$cTimeStamp ]; Year ( a ) & Right ( "0" & Month ( a ) ; 2 ) & Right ( "0" & Day ( a ) ; 2 ) & "T" & Right ( "0" & Hour ( a ) ; 2 ) & Right ( "0" & Minute ( a ) ; 2 ) & Right ( "0" & Seconds ( a ) ; 2 ) & "Z" ) ]
                                            • #3. Set AWS SNS Endpoint and Host
                                            • Set Variable [ $$Service; Value:"sns" ]
                                            • Set Variable [ $$Host; Value:"sns." & $$AWSRegion & ".amazonaws.com" ]
                                            • Set Variable [ $$URL; Value:"https://" & $$Host ]
                                            • #4. Create the Payload
                                            • Set Variable [ $$Payload; Value:"Action=Publish&PhoneNumber=" & URLEncode ( $$PhoneNumber) & "&Message=" & URLEncode ( $$Message ) ]
                                            • Set Field [ CURL Test::Input; $$Payload ]
                                            • #send via MBS Plugin using CURL functions
                                            • Set Variable [ $curl; Value:MBS("CURL.New") ]
                                            • Set Variable [ $result; Value:MBS("CURL.SetOptionURL"; $curl; $$URL) ]
                                            • Set Variable [ $result; Value:MBS("CURL.SetOptionPostFields"; $curl; $$Payload) ]
                                            • Set Variable [ $result; Value:MBS("CURL.SetOptionAWSSigV4"; $curl; "aws:amz:us-east-2:sns") ]
                                            • Set Variable [ $result; Value:MBS("CURL.SetOptionUserName"; $curl; CURL Test::AWS_access_key) ]
                                            • Set Variable [ $result; Value:MBS("CURL.SetOptionPassword"; $curl; CURL Test::AWS_secret_key) ]
                                            • Set Field [ CURL Test::Result; MBS("CURL.Perform"; $curl) ]
                                            • Set Field [ CURL Test::Result; MBS("CURL.GetResultAsText"; $curl; "utf-8") ]
                                            • Set Field [ CURL Test::debug; MBS("CURL.GetDebugMessages"; $curl) ]
                                            • Set Variable [ $result; Value:MBS("CURL.Release"; $curl) ]
                                            • Exit Script [ ]
                                            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: [Send SMS]
                                                  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
                                                    • Set Field [ CURL Test::Input; "" ]
                                                    • Set Field [ CURL Test::debug; "" ]
                                                    • Set Field [ CURL Test::Result; "" ]
                                                    Fields used in this script
                                                    Scripts used in this script
                                                      Layouts used in this script
                                                        Tables used in this script
                                                        Table occurrences used by this script
                                                        Custom Functions used by this script
                                                          Custom menu set used by this script

                                                            Custom Functions

                                                            Function Name Parameters Availability Definition In Field Definitions In Scripts
                                                            URLEncode theString All accounts Let ( [ t = Substitute ( theString ; [ " " ; "%20" ] ; [ "!" ; "%21" ] ; [ "#" ; "%23" ] ; [ "$" ; "%24" ] ; [ "&" ; "%26" ] ; [ "'" ; "%27" ] ; [ "(" ; "%28" ] ; [ ")" ; "%29" ] ; [ "*" ; "%2A" ] ; [ "+" ; "%2B" ] ; [ "," ; "%2C" ] ; [ "/" ; "%2F" ] ; [ ":" ; "%3A" ] ; [ ";" ; "%3B" ] ; [ "=" ; "%3D" ] ; [ "?" ; "%3F" ] ; [ "@" ; "%40" ] ; [ "[" ; "%5B" ] ; [ "]" ; "%5D" ] ; [ "¶" ; "%0A" ] ; [ "!" ; "%21" ] ) ] ; t )

                                                              Custom Menu Sets

                                                              Menu Sets Menus In Scripts In Layouts Comments
                                                              [Standard FileMaker Menus]
                                                              • All Standard Menus
                                                              Angepasstes Menüset 1

                                                              Download example: AWS SNS SMS Send

                                                              Used functions: