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

MBS FileMaker Plugin Example Databases

ZipFile

All examples are included with download of MBS FileMaker Plugin.

ZipFile.fmp12

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

 

Tables

Table Name
Statistics
Occurrences in Relationship Graph
ZipFile
11 fields defined, 1 record
ZipFile

Fields

Table Name: ZipFile - 11 Fields
Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
ArchiveNameNormal, TextAuto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Repetitions: 1
  • Indexing: None
  • Automatically create indexes as needed
  • Index Language: German
      TextFileNameNormal, TextAuto-Enter:
      • Allow editing
      Validation:
      • Only during data entry
      Storage:
      • Repetitions: 1
      • Indexing: None
      • Automatically create indexes as needed
      • Index Language: German
          TextFileDateNormal, TimestampAuto-Enter:
          • Creation timestamp
          • Allow editing
          Validation:
          • Only during data entry
          Storage:
          • Repetitions: 1
          • Indexing: None
          • Automatically create indexes as needed
          • Index Language: German
              TextFileCommentNormal, TextAuto-Enter:
              • Allow editing
              Validation:
              • Only during data entry
              Storage:
              • Repetitions: 1
              • Indexing: None
              • Automatically create indexes as needed
              • Index Language: German
                  TextFileContentNormal, TextAuto-Enter:
                  • Allow editing
                  Validation:
                  • Only during data entry
                  Storage:
                  • Repetitions: 1
                  • Indexing: None
                  • Automatically create indexes as needed
                  • Index Language: German
                      DataFileNameNormal, TextAuto-Enter:
                      • Allow editing
                      Validation:
                      • Only during data entry
                      Storage:
                      • Repetitions: 1
                      • Indexing: None
                      • Automatically create indexes as needed
                      • Index Language: German
                          DataFileDateNormal, TimestampAuto-Enter:
                          • Creation timestamp
                          • Allow editing
                          Validation:
                          • Only during data entry
                          Storage:
                          • Repetitions: 1
                          • Indexing: None
                          • Automatically create indexes as needed
                          • Index Language: German
                              DataFileCommentNormal, TextAuto-Enter:
                              • Allow editing
                              Validation:
                              • Only during data entry
                              Storage:
                              • Repetitions: 1
                              • Indexing: None
                              • Automatically create indexes as needed
                              • Index Language: German
                                  DataFileContentNormal, BinaryAuto-Enter:
                                  • Allow editing
                                  Validation:
                                  • Only during data entry
                                  Storage:
                                  • Repetitions: 1
                                      GlobalCommentNormal, TextAuto-Enter:
                                      • Allow editing
                                      Validation:
                                      • Only during data entry
                                      Storage:
                                      • Repetitions: 1
                                      • Indexing: None
                                      • Automatically create indexes as needed
                                      • Index Language: German
                                          PasswordNormal, TextAuto-Enter:
                                          • Allow editing
                                          Validation:
                                          • Only during data entry
                                          Storage:
                                          • Global
                                          • Repetitions: 1
                                          • Index Language: German

                                              Layout Objects: ZipFile

                                              Regular Fields

                                              Field Name: ZipFile::ArchiveName
                                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                              • Top: 24 pt
                                              • Left: 138 pt
                                              • Bottom: 38 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: System Default
                                              • Go to next field using: Tab key
                                              Yes

                                              Field Name: ZipFile::TextFileName
                                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                              • Top: 42 pt
                                              • Left: 138 pt
                                              • Bottom: 56 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: System Default
                                              • Go to next field using: Tab key
                                              Yes

                                              Field Name: ZipFile::TextFileDate
                                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                              • Top: 60 pt
                                              • Left: 138 pt
                                              • Bottom: 74 pt
                                              • Right: 379 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: ZipFile::TextFileComment
                                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                              • Top: 78 pt
                                              • Left: 138 pt
                                              • Bottom: 92 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: System Default
                                              • Go to next field using: Tab key
                                              Yes

                                              Field Name: ZipFile::TextFileContent
                                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                              • Top: 96 pt
                                              • Left: 138 pt
                                              • Bottom: 110 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: System Default
                                              • Go to next field using: Tab key
                                              Yes

                                              Field Name: ZipFile::DataFileName
                                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                              • Top: 114 pt
                                              • Left: 138 pt
                                              • Bottom: 128 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: System Default
                                              • Go to next field using: Tab key
                                              Yes

                                              Field Name: ZipFile::DataFileDate
                                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                              • Top: 132 pt
                                              • Left: 138 pt
                                              • Bottom: 146 pt
                                              • Right: 379 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: ZipFile::DataFileComment
                                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                              • Top: 150 pt
                                              • Left: 138 pt
                                              • Bottom: 164 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: System Default
                                              • Go to next field using: Tab key
                                              Yes

                                              Field Name: ZipFile::DataFileContent
                                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                              • Top: 168 pt
                                              • Left: 138 pt
                                              • Bottom: 293 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: System Default
                                              • Go to next field using: Tab key
                                              No

                                              Field Name: ZipFile::GlobalComment
                                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                              • Top: 294 pt
                                              • Left: 138 pt
                                              • Bottom: 308 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: System Default
                                              • Go to next field using: Tab key
                                              Yes

                                              Field Name: ZipFile::Password
                                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                              • Top: 312 pt
                                              • Left: 138 pt
                                              • Bottom: 326 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: System Default
                                              • Go to next field using: Tab key
                                              No

                                              Group Buttons

                                              Button PropertiesCoordinatesScript/Script Step
                                                Type:
                                              • Text: Create Zip Archive
                                                Additional Properties:
                                              • Change to hand cursor over button
                                              • Rectangular
                                              • Top: 24 pt
                                              • Left: 408 pt
                                              • Bottom: 49 pt
                                              • Right: 535 pt
                                              • Anchoring: Left, Top
                                              Perform Script [ “Run” ]

                                              Scripts:


                                              Script Hierarchy

                                              Run

                                              Script NameRun
                                              Run script with full access privilegesOff
                                              Include In MenuYes
                                              Layouts that use this script
                                              Scripts that use this script
                                                Script Definition
                                                Script Steps
                                                • #Destination path
                                                • Set Variable [ $path; Value:Get ( DesktopPath ) & "/" & ZipFile::ArchiveName ]
                                                • Set Variable [ $path; Value:MBS( "Path.FilemakerPathToNativePath"; $path ) ]
                                                • #Create archive
                                                • Set Variable [ $r; Value:MBS( "ZipFile.Open"; $path; 0 ) ]
                                                • If [ $r ≠ "OK" ]
                                                • Show Custom Dialog [ Title: "Error"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                                • Exit Script [ ]
                                                • End If
                                                • #Password?
                                                • Set Variable [ $r; Value:MBS( "ZipFile.UsePassword"; ZipFile::Password) ]
                                                • #Add Text File
                                                • Set Variable [ $r; Value:MBS( "ZipFile.CreateFile"; ZipFile::TextFileName; ZipFile::TextFileDate; ZipFile::TextFileComment) ]
                                                • If [ $r ≠ "OK" ]
                                                • Show Custom Dialog [ Title: "Error"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                                • Set Variable [ $r; Value:MBS( "ZipFile.Close") ]
                                                • Exit Script [ ]
                                                • End If
                                                • Set Variable [ $r; Value:MBS( "ZipFile.WriteText"; ZipFile::TextFileContent; "UTF8" ) ]
                                                • If [ $r ≠ "OK" ]
                                                • Show Custom Dialog [ Title: "Error"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                                • Set Variable [ $r; Value:MBS( "ZipFile.Close") ]
                                                • Exit Script [ ]
                                                • End If
                                                • #Create data filew with JPEG
                                                • Set Variable [ $r; Value:MBS( "ZipFile.CreateFile"; ZipFile::DataFileName; ZipFile::DataFileDate; ZipFile::DataFileComment) ]
                                                • If [ $r ≠ "OK" ]
                                                • Show Custom Dialog [ Title: "Error"; Message: $r; Default Button: “OK”, Commit: “No”; Button 2: “Abbrechen”, Commit: “No” ]
                                                • Set Variable [ $r; Value:MBS( "ZipFile.Close") ]
                                                • Exit Script [ ]
                                                • End If
                                                • Set Variable [ $r; Value:MBS( "ZipFile.WriteContainer"; ZipFile::DataFileContent) ]
                                                • If [ $r ≠ "OK" ]
                                                • Show Custom Dialog [ Title: "Error"; Message: $r; Default Button: “OK”, Commit: “No”; Button 2: “Abbrechen”, Commit: “No” ]
                                                • Set Variable [ $r; Value:MBS( "ZipFile.Close") ]
                                                • Exit Script [ ]
                                                • End If
                                                • #Create data file with Data
                                                • Set Variable [ $r; Value:MBS( "ZipFile.CreateFile"; "Hello.txt"; Get ( CurrentTimestamp )) ]
                                                • If [ $r ≠ "OK" ]
                                                • Show Custom Dialog [ Title: "Error"; Message: $r; Default Button: “OK”, Commit: “No”; Button 2: “Abbrechen”, Commit: “No” ]
                                                • Set Variable [ $r; Value:MBS( "ZipFile.Close") ]
                                                • Exit Script [ ]
                                                • End If
                                                • Set Variable [ $r; Value:MBS( "ZipFile.WriteHex"; "48656C6C6F20576F726C64" ) ]
                                                • If [ $r ≠ "OK" ]
                                                • Show Custom Dialog [ Title: "Error"; Message: $r; Default Button: “OK”, Commit: “No”; Button 2: “Abbrechen”, Commit: “No” ]
                                                • Set Variable [ $r; Value:MBS( "ZipFile.Close") ]
                                                • Exit Script [ ]
                                                • End If
                                                • #Close Archive
                                                • Set Variable [ $r; Value:MBS( "ZipFile.Close"; ZipFile::GlobalComment) ]
                                                • If [ $r ≠ "OK" ]
                                                • Show Custom Dialog [ Title: "Error"; Message: $r; Default Button: “OK”, Commit: “No”; Button 2: “Abbrechen”, Commit: “No” ]
                                                • Exit Script [ ]
                                                • End If
                                                • Show Custom Dialog [ Title: "Finished."; Message: "OK"; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                                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: ZipFile

                                                        Used functions: