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
Tables 1
Relationships 0
Layouts 1
Scripts 1
Value Lists 0
Custom Functions 0
Custom Menus 33
File Options
Default custom menu set [Standard FileMaker Menus]
Default theme Apex Blue
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
ZipFile
11 fields defined, 1 record
ZipFile

Fields

Table Name: ZipFile - 11 Fields
Field Name Type Options Comments On Layouts In Relationships In Scripts In Value Lists
ArchiveName Normal, Text Auto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Repetitions: 1
  • Indexing: None
  • Automatically create indexes as needed
  • Index Language: German
      TextFileName Normal, Text Auto-Enter:
      • Allow editing
      Validation:
      • Only during data entry
      Storage:
      • Repetitions: 1
      • Indexing: None
      • Automatically create indexes as needed
      • Index Language: German
          TextFileDate Normal, Timestamp Auto-Enter:
          • Creation timestamp
          • Allow editing
          Validation:
          • Only during data entry
          Storage:
          • Repetitions: 1
          • Indexing: None
          • Automatically create indexes as needed
          • Index Language: German
              TextFileComment Normal, Text Auto-Enter:
              • Allow editing
              Validation:
              • Only during data entry
              Storage:
              • Repetitions: 1
              • Indexing: None
              • Automatically create indexes as needed
              • Index Language: German
                  TextFileContent Normal, Text Auto-Enter:
                  • Allow editing
                  Validation:
                  • Only during data entry
                  Storage:
                  • Repetitions: 1
                  • Indexing: None
                  • Automatically create indexes as needed
                  • Index Language: German
                      DataFileName Normal, Text Auto-Enter:
                      • Allow editing
                      Validation:
                      • Only during data entry
                      Storage:
                      • Repetitions: 1
                      • Indexing: None
                      • Automatically create indexes as needed
                      • Index Language: German
                          DataFileDate Normal, Timestamp Auto-Enter:
                          • Creation timestamp
                          • Allow editing
                          Validation:
                          • Only during data entry
                          Storage:
                          • Repetitions: 1
                          • Indexing: None
                          • Automatically create indexes as needed
                          • Index Language: German
                              DataFileComment Normal, Text Auto-Enter:
                              • Allow editing
                              Validation:
                              • Only during data entry
                              Storage:
                              • Repetitions: 1
                              • Indexing: None
                              • Automatically create indexes as needed
                              • Index Language: German
                                  DataFileContent Normal, Binary Auto-Enter:
                                  • Allow editing
                                  Validation:
                                  • Only during data entry
                                  Storage:
                                  • Repetitions: 1
                                      GlobalComment Normal, Text Auto-Enter:
                                      • Allow editing
                                      Validation:
                                      • Only during data entry
                                      Storage:
                                      • Repetitions: 1
                                      • Indexing: None
                                      • Automatically create indexes as needed
                                      • Index Language: German
                                          Password Normal, Text Auto-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 Properties Coordinates Field Format Field Behavior Quick 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 Properties Coordinates Field Format Field Behavior Quick 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 Properties Coordinates Field Format Field Behavior Quick 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 Properties Coordinates Field Format Field Behavior Quick 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 Properties Coordinates Field Format Field Behavior Quick 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 Properties Coordinates Field Format Field Behavior Quick 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 Properties Coordinates Field Format Field Behavior Quick 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 Properties Coordinates Field Format Field Behavior Quick 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 Properties Coordinates Field Format Field Behavior Quick 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 Properties Coordinates Field Format Field Behavior Quick 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 Properties Coordinates Field Format Field Behavior Quick 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 Properties Coordinates Script/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 Name Run
                                              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
                                                • #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: