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

MBS FileMaker Plugin Example Databases

Containers in S3

All examples are included with download of MBS FileMaker Plugin.

Containers in S3.fmp12

Overview
Tables1
Relationships0
Layouts1
Scripts4
Value Lists0
Custom Functions0
Custom Menus24
File Options
Default custom menu set[Standard FileMaker Menus]
When opening file
Minimum allowed version12.0
Login usingAccount Name; Account= Admin
Allow user to save passwordOff
Require iOS passcodeOff
Switch to layoutOff
Hide all toolbarsOff
Script triggers
OnFirstWindowOpenOff
OnLastWindowCloseOff
OnWindowOpenOff
OnWindowCloseOff
OnFileAVPlayerChangeOff
Thumbnail Settings
Generate ThumbnailsOn; Temporary

 

Tables

Table Name
Statistics
Occurrences in Relationship Graph
Containers in S3
12 fields defined, 0 record
Containers in S3

Fields

Table Name: Containers in S3 - 12 Fields
Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
PrimaryKeyNormal, TextAuto-Enter: Validation:
  • Only during data entry
  • Not empty
  • Unique
  • Strict validation
Storage:
  • Repetitions: 1
  • Indexing: Minimal
  • Automatically create indexes as needed
  • Index Language: Unicode Raw
Unique identifier of each record in this table
          CreationTimestampNormal, TimestampAuto-Enter:
          • Creation timestamp
          Validation:
          • Only during data entry
          • Strict data type: 4 digit year
          • Not empty
          • Strict validation
          Storage:
          • Repetitions: 1
          • Indexing: None
          • Automatically create indexes as needed
          • Index Language: German
          Date and time each record was created
                  CreatedByNormal, TextAuto-Enter:
                  • Creation account name
                  Validation:
                  • Only during data entry
                  • Not empty
                  • Strict validation
                  Storage:
                  • Repetitions: 1
                  • Indexing: None
                  • Automatically create indexes as needed
                  • Index Language: German
                  Account name of the user who created each record
                          ModificationTimestampNormal, TimestampAuto-Enter:
                          • Modification timestamp
                          Validation:
                          • Only during data entry
                          • Strict data type: 4 digit year
                          • Not empty
                          • Strict validation
                          Storage:
                          • Repetitions: 1
                          • Indexing: None
                          • Automatically create indexes as needed
                          • Index Language: German
                          Date and time each record was last modified
                                  ModifiedByNormal, TextAuto-Enter:
                                  • Modification account name
                                  Validation:
                                  • Only during data entry
                                  • Not empty
                                  • Strict validation
                                  Storage:
                                  • Repetitions: 1
                                  • Indexing: None
                                  • Automatically create indexes as needed
                                  • Index Language: German
                                  Account name of the user who last modified each record
                                          TempNormal, BinaryAuto-Enter:
                                          • Allow editing
                                          Validation:
                                          • Only during data entry
                                          Storage:
                                          • Global
                                          • Repetitions: 1
                                              PathNormal, TextAuto-Enter:
                                              • Allow editing
                                              Validation:
                                              • Only during data entry
                                              Storage:
                                              • Repetitions: 1
                                              • Indexing: None
                                              • Automatically create indexes as needed
                                              • Index Language: German
                                                  Bucket NameNormal, TextAuto-Enter:
                                                  • Allow editing
                                                  Validation:
                                                  • Only during data entry
                                                  Storage:
                                                  • Global
                                                  • Repetitions: 1
                                                  • Index Language: German
                                                      Access Key IDNormal, TextAuto-Enter:
                                                      • Allow editing
                                                      Validation:
                                                      • Only during data entry
                                                      Storage:
                                                      • Global
                                                      • Repetitions: 1
                                                      • Index Language: German
                                                          Secret Access KeyNormal, TextAuto-Enter:
                                                          • Allow editing
                                                          Validation:
                                                          • Only during data entry
                                                          Storage:
                                                          • Global
                                                          • Repetitions: 1
                                                          • Index Language: German
                                                              NameNormal, TextAuto-Enter:
                                                              • Allow editing
                                                              Validation:
                                                              • Only during data entry
                                                              Storage:
                                                              • Repetitions: 1
                                                              • Indexing: None
                                                              • Automatically create indexes as needed
                                                              • Index Language: German
                                                                  RegionNormal, TextAuto-Enter:
                                                                  • Allow editing
                                                                  Validation:
                                                                  • Only during data entry
                                                                  Storage:
                                                                  • Global
                                                                  • Repetitions: 1
                                                                  • Index Language: German

                                                                      Layout Objects: Containers in S3

                                                                      Regular Fields

                                                                      Field Name: Containers in S3::Temp
                                                                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                      • Top: 683 pt
                                                                      • Left: 88 pt
                                                                      • Bottom: 808 pt
                                                                      • Right: 341 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
                                                                      No

                                                                      Field Name: Containers in S3::Path
                                                                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                      • Top: 121 pt
                                                                      • Left: 88 pt
                                                                      • Bottom: 152 pt
                                                                      • Right: 1011 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: Containers in S3::Bucket Name
                                                                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                      • Top: 695 pt
                                                                      • Left: 509 pt
                                                                      • Bottom: 726 pt
                                                                      • Right: 762 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
                                                                      No

                                                                      Field Name: Containers in S3::Access Key ID
                                                                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                      • Top: 730 pt
                                                                      • Left: 509 pt
                                                                      • Bottom: 761 pt
                                                                      • Right: 762 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
                                                                      No

                                                                      Field Name: Containers in S3::Secret Access Key
                                                                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                      • Top: 765 pt
                                                                      • Left: 509 pt
                                                                      • Bottom: 796 pt
                                                                      • Right: 762 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
                                                                      No

                                                                      Field Name: Containers in S3::Name
                                                                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                      • Top: 161 pt
                                                                      • Left: 88 pt
                                                                      • Bottom: 192 pt
                                                                      • Right: 1011 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: Containers in S3::Region
                                                                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                      • Top: 800 pt
                                                                      • Left: 509 pt
                                                                      • Bottom: 831 pt
                                                                      • Right: 762 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
                                                                      No

                                                                      Buttons

                                                                      Button PropertiesCoordinatesScript/Script Step
                                                                        Type:
                                                                      • Text: Import Picture
                                                                      • Top: 73 pt
                                                                      • Left: 7 pt
                                                                      • Bottom: 104 pt
                                                                      • Right: 139 pt
                                                                      • Anchoring: Left, Top
                                                                      Perform Script [ “Import Picture” ]

                                                                      Scripts:


                                                                      Button PropertiesCoordinatesScript/Script Step
                                                                        Type:
                                                                      • Text: Export Picture
                                                                      • Top: 73 pt
                                                                      • Left: 879 pt
                                                                      • Bottom: 104 pt
                                                                      • Right: 1011 pt
                                                                      • Anchoring: Right, Top
                                                                      Perform Script [ “Download File” ]

                                                                      Scripts:


                                                                      Web Viewer Controls

                                                                      Web Viewer Control PropertiesCoordinatesWeb Address
                                                                        Object Name:
                                                                      • web
                                                                        Additional Properties:
                                                                      • Allow interaction with web viewer content
                                                                      • Display progress bar
                                                                      • Display status messages
                                                                      • Automatically encode URL
                                                                      • Top: 213 pt
                                                                      • Left: 7 pt
                                                                      • Bottom: 675 pt
                                                                      • Right: 1012 pt
                                                                      • Anchoring: Left and Right, Top and Bottom
                                                                      "about:blank"

                                                                      Script Hierarchy

                                                                      Import Picture
                                                                      Upload File
                                                                      Preview
                                                                      Download File

                                                                      Next Script: [Upload File]
                                                                      Script NameImport Picture
                                                                      Run script with full access privilegesOff
                                                                      Include In MenuNo
                                                                      Layouts that use this script
                                                                      Scripts that use this script
                                                                        Script Definition
                                                                        Script Steps
                                                                        • #Let user import an image into global container to upload
                                                                        • Set Error Capture [ On ]
                                                                        • Set Field [ Containers in S3::Temp; "" ]
                                                                        • Go to Field [ Containers in S3::Temp ]
                                                                        • Insert Picture [ ]
                                                                        • If [ Get(LastError) = 0 ]
                                                                        • New Record/Request
                                                                        • Perform Script [ “Upload File” ]
                                                                        • 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: [Import Picture]Next Script: [Preview]
                                                                              Script NameUpload File
                                                                              Run script with full access privilegesOff
                                                                              Include In MenuNo
                                                                              Layouts that use this script
                                                                                Scripts that use this script
                                                                                Script Definition
                                                                                Script Steps
                                                                                • #Upload file to Amazon S3
                                                                                • If [ not IsEmpty ( Containers in S3::Temp ) ]
                                                                                • Set Variable [ $Bucketname; Value:Trim(Containers in S3::Bucket Name) ]
                                                                                • Set Variable [ $AWSAccessKeyId; Value:Containers in S3::Access Key ID ]
                                                                                • Set Variable [ $AWSSecretAccessKey; Value:Containers in S3::Secret Access Key ]
                                                                                • Set Variable [ $Region; Value:Containers in S3::Region ]
                                                                                • Set Variable [ $filename; Value:MBS( "Path.LastPathComponent"; GetAsText ( Containers in S3::Temp )) ]
                                                                                • Set Variable [ $fileExtension; Value:MBS( "Files.FileExtension"; $filename ) ]
                                                                                • Set Variable [ $mimeType; Value:MBS( "Text.FileExtensionToMimeType"; $FileExtension ) ]
                                                                                • Set Variable [ $folder; Value:Get(UUID) ]
                                                                                • Set Variable [ $Service; Value:"s3" ]
                                                                                • Set Variable [ $Verb; Value:"PUT" ]
                                                                                • #Keep those empty for default
                                                                                • Set Variable [ $Domain; Value:"" ]
                                                                                • Set Variable [ $HashedPayload; Value:"" ]
                                                                                • Set Variable [ $Path; Value:"/" & $BucketName & "/" & $folder & "/container." & $fileExtension ]
                                                                                • Set Variable [ $Headers; Value:"Content-Type: " & $mimeType ]
                                                                                • Set Variable [ $curl; Value:MBS("CURL.New") ]
                                                                                • Set Variable [ $result; Value:MBS("CURL.SetInputFile"; $curl; Containers in S3::Temp) ]
                                                                                • Set Variable [ $result; Value:MBS("CURL.SetupAWS"; $curl; $AWSAccessKeyId; $AWSSecretAccessKey; $Region; $Service; $Path; $Domain; $Verb; $HashedPayload; $Headers) ]
                                                                                • Set Variable [ $r; Value:MBS("CURL.Perform"; $curl) ]
                                                                                • Set Variable [ $ResponseCode; Value:MBS("CURL.GetResponseCode"; $curl) ]
                                                                                • If [ $r = "OK" ]
                                                                                • Set Variable [ $$log; Value:MBS("CURL.GetDebugMessages"; $curl) ]
                                                                                • Set Variable [ $$text; Value:MBS("CURL.GetResultAsText"; $curl) ]
                                                                                • Set Variable [ $result; Value:MBS("CURL.Release"; $curl) ]
                                                                                • If [ $ResponseCode = 200 ]
                                                                                • Set Field [ Containers in S3::Path; $Path ]
                                                                                • Set Field [ Containers in S3::Name; $filename ]
                                                                                • Set Field [ Containers in S3::Temp; "" ]
                                                                                • Perform Script [ “Preview” ]
                                                                                • Else
                                                                                • Show Custom Dialog [ Title: "Upload failed"; Message: "Error: " & $ResponseCode; Default Button: “OK”, Commit: “Yes” ]
                                                                                • End If
                                                                                • 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: [Upload File]Next Script: [Download File]
                                                                                      Script NamePreview
                                                                                      Run script with full access privilegesOff
                                                                                      Include In MenuNo
                                                                                      Layouts that use this script
                                                                                        Scripts that use this script
                                                                                        Script Definition
                                                                                        Script Steps
                                                                                        • #Load image into container to preview
                                                                                        • If [ not IsEmpty ( Containers in S3::Path ) ]
                                                                                        • Set Variable [ $AWSAccessKeyId; Value:Containers in S3::Access Key ID ]
                                                                                        • Set Variable [ $AWSSecretAccessKey; Value:Containers in S3::Secret Access Key ]
                                                                                        • Set Variable [ $Region; Value:Containers in S3::Region ]
                                                                                        • Set Variable [ $Verb; Value:"GET" ]
                                                                                        • Set Variable [ $Service; Value:"s3" ]
                                                                                        • #Keep domain empty for default, which is service concatted by region
                                                                                        • Set Variable [ $Domain; Value:"" ]
                                                                                        • #Build a path
                                                                                        • Set Variable [ $Path; Value:Containers in S3::Path ]
                                                                                        • #and get the URL
                                                                                        • Set Variable [ $URL; Value:MBS( "CURL.AWSPresignURL"; $AWSAccessKeyId; $AWSSecretAccessKey; $Region; $Service; $Path; $Domain; $Verb ) ]
                                                                                        • Set Web Viewer [ Object Name: "web"; URL: $url ]
                                                                                        • 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: [Preview]
                                                                                                Script NameDownload File
                                                                                                Run script with full access privilegesOff
                                                                                                Include In MenuYes
                                                                                                Layouts that use this script
                                                                                                Scripts that use this script
                                                                                                  Script Definition
                                                                                                  Script Steps
                                                                                                  • #Downloads into Container to export
                                                                                                  • Set Error Capture [ On ]
                                                                                                  • If [ not IsEmpty ( Containers in S3::Path ) ]
                                                                                                  • Set Variable [ $AWSAccessKeyId; Value:Containers in S3::Access Key ID ]
                                                                                                  • Set Variable [ $AWSSecretAccessKey; Value:Containers in S3::Secret Access Key ]
                                                                                                  • Set Variable [ $Bucketname; Value:Containers in S3::Bucket Name ]
                                                                                                  • Set Variable [ $Region; Value:Containers in S3::Region ]
                                                                                                  • Set Variable [ $Verb; Value:"GET" ]
                                                                                                  • Set Variable [ $Service; Value:"s3" ]
                                                                                                  • #Keep those empty for default
                                                                                                  • Set Variable [ $Domain; Value:"" ]
                                                                                                  • Set Variable [ $HashedPayload; Value:"" ]
                                                                                                  • #Build a path
                                                                                                  • Set Variable [ $Path; Value:Containers in S3::Path ]
                                                                                                  • Set Variable [ $FileName; Value:Containers in S3::Name ]
                                                                                                  • Set Variable [ $curl; Value:MBS("CURL.New") ]
                                                                                                  • Set Variable [ $result; Value:MBS("CURL.SetupAWS"; $curl; $AWSAccessKeyId; $AWSSecretAccessKey; $Region; $Service; $Path; $Domain; $Verb; ""; "") ]
                                                                                                  • Set Variable [ $result; Value:MBS("CURL.SetDebugWithData"; $curl; 1) ]
                                                                                                  • Set Variable [ $r; Value:MBS("CURL.Perform"; $curl) ]
                                                                                                  • Set Variable [ $$log; Value:MBS("CURL.GetDebugMessages"; $curl) ]
                                                                                                  • Set Variable [ $$text; Value:MBS("CURL.GetResultAsText"; $curl) ]
                                                                                                  • Set Variable [ $ResponseCode; Value:MBS("CURL.GetResponseCode"; $curl) ]
                                                                                                  • If [ $ResponseCode = 200 ]
                                                                                                  • Set Field [ Containers in S3::Temp; MBS("CURL.GetResultAsContainer"; $curl; $filename) ]
                                                                                                  • Export Field Contents [ Containers in S3::Temp; Create directories:No ]
                                                                                                  • Set Field [ Containers in S3::Temp; "" ]
                                                                                                  • End If
                                                                                                  • Set Variable [ $result; Value:MBS("CURL.Cleanup"; $curl) ]
                                                                                                  • 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

                                                                                                          Download example: Containers in S3

                                                                                                          Used functions: