MBS FileMaker Plugin Example Databases

Tables

All examples are included with download of MBS FileMaker Plugin.

Tables.fmp12

Overview
Tables2
Relationships0
Layouts2
Scripts4
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
Tables
1 field defined, 1 record
Tables
Images
1 field defined, 24 records
Images

Fields

Table Name: Tables - 1 Fields
Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
OutputPDFNormal, BinaryAuto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Repetitions: 1

      Table Name: Images - 1 Fields
      Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
      ImageNormal, BinaryAuto-Enter:
      • Allow editing
      Validation:
      • Only during data entry
      Storage:
      • Repetitions: 1

          Layout Objects: Tables

          Regular Fields

          Field Name: Tables::OutputPDF
          Field PropertiesCoordinatesField FormatField BehaviorQuick Find
          • Top: 24 pt
          • Left: 138 pt
          • Bottom: 521 pt
          • Right: 553 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 Text Table
            Additional Properties:
          • Change to hand cursor over button
          • Rectangular
          • Top: 24 pt
          • Left: 576 pt
          • Bottom: 49 pt
          • Right: 739 pt
          • Anchoring: Left, Top
          Perform Script [ “CreateTextTable” ]

          Scripts:


          Button PropertiesCoordinatesScript/Script Step
            Type:
          • Text: Create Image Table
            Additional Properties:
          • Change to hand cursor over button
          • Rectangular
          • Top: 54 pt
          • Left: 576 pt
          • Bottom: 79 pt
          • Right: 739 pt
          • Anchoring: Left, Top
          Perform Script [ “CreateImageTable” ]

          Scripts:


          Button PropertiesCoordinatesScript/Script Step
            Type:
          • Text: Create Template Table
            Additional Properties:
          • Change to hand cursor over button
          • Rectangular
          • Top: 84 pt
          • Left: 576 pt
          • Bottom: 109 pt
          • Right: 739 pt
          • Anchoring: Left, Top
          Perform Script [ “CreateTemplateTable” ]

          Scripts:


          Layout Objects: Images

          Regular Fields

          Field Name: Images::Image
          Field PropertiesCoordinatesField FormatField BehaviorQuick Find
          • Top: 24 pt
          • Left: 138 pt
          • Bottom: 251 pt
          • Right: 547 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

          Script Hierarchy

          CreateTextTable
          CreateImageTable
          CreateTemplateTable
          InitDynaPDF

          Next Script: [CreateImageTable]
          Script NameCreateTextTable
          Run script with full access privilegesOff
          Include In MenuYes
          Layouts that use this script
          Scripts that use this script
            Script Definition
            Script Steps
            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: [CreateTextTable]Next Script: [CreateTemplateTable]
                  Script NameCreateImageTable
                  Run script with full access privilegesOff
                  Include In MenuYes
                  Layouts that use this script
                  Scripts that use this script
                    Script Definition
                    Script Steps
                    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: [CreateImageTable]Next Script: [InitDynaPDF]
                        Script NameCreateTemplateTable
                        Run script with full access privilegesOff
                        Include In MenuYes
                        Layouts that use this script
                        Scripts that use this script
                          Script Definition
                          Script Steps
                          • #Initialize DynaPDF if needed
                          • If [ $$DynaPDFInited ≠ 1 ]
                          • Perform Script [ “InitDynaPDF” ]
                          • End If
                          • #Find dynapdf_help.pdf
                          • Set Variable [ $databasePath; Value:Get(FilePath) ]
                          • Set Variable [ $databasePath; Value:MBS("Path.FilemakerPathToNativePath"; $databasePath) ]
                          • Set Variable [ $databasePath; Value:Substitute ( $databasePath ; ".fp7" ; ".fmp12") ]
                          • Set Variable [ $databaseName; Value:Get(FileName) & ".fmp12" ]
                          • Set Variable [ $path; Value:Substitute ( $databasePath ; $databaseName ; "dynapdf_help.pdf" ) ]
                          • #Clear current PDF document
                          • Set Variable [ $pdf; Value:MBS("DynaPDF.New") ]
                          • Set Variable [ $r; Value:MBS("DynaPDF.SetPageCoords"; $pdf; "TopDown") ]
                          • Set Variable [ $r; Value:MBS("DynaPDF.OpenPDFFromFile"; $pdf; $path) ]
                          • Set Variable [ $pageCount; Value:MBS("DynaPDF.GetImportPageCount"; $pdf) ]
                          • Set Variable [ $pageCount; Value:20 ]
                          • If [ GetAsNumber($pageCount)>0 ]
                          • #Create Table
                          • Set Variable [ $table; Value:MBS("DynaPDF.Table.Create"; $pdf; $pageCount/4+1; 2; 512,12; 0) ]
                          • Set Variable [ $r; Value:MBS("DynaPDF.Table.SetBorderWidth"; $table; -1; -1; 1; 1; 1; 1) ]
                          • Set Variable [ $r; Value:MBS("DynaPDF.Table.SetCellPadding"; $table; -1; -1; 5; 5; 5; 5) ]
                          • Set Variable [ $r; Value:MBS("DynaPDF.Table.SetGridWidth"; $table; 1; 1) ]
                          • Set Variable [ $r; Value:MBS("DynaPDF.Table.SetFlags"; $table; -1; -1; "ScaleToRect") ]
                          • Set Variable [ $r; Value:MBS("DynaPDF.SetPageFormat"; $table; "US Letter") ]
                          • #Add Rows
                          • Set Variable [ $rowCount; Value:0 ]
                          • Set Variable [ $i; Value:1 ]
                          • Set Variable [ $x; Value:0 ]
                          • Loop
                          • Set Variable [ $tmpl; Value:MBS("DynaPDF.ImportPageAsTemplate"; $pdf; $i) ]
                          • If [ $x = 0 ]
                          • Set Variable [ $rowNum; Value:MBS("DynaPDF.Table.AddRow"; $table; 335) ]
                          • End If
                          • Set Variable [ $r; Value:MBS("DynaPDF.Table.SetCellTemplate"; $table; $rowNum; $x; 1; "center"; "center"; $tmpl; 0; 0) ]
                          • Set Variable [ $x; Value:If($x = 0; 1; 0) ]
                          • Set Variable [ $i; Value:$i + 1 ]
                          • Exit Loop If [ $i > $pageCount ]
                          • End Loop
                          • #Draw Table
                          • Set Variable [ $r; Value:MBS("DynaPDF.AppendPage"; $pdf) ]
                          • Set Variable [ $r; Value:MBS("DynaPDF.Table.Draw"; $table; 50; 50; 742) ]
                          • If [ MBS("DynaPDF.Table.HaveMore"; $pdf) ]
                          • Loop
                          • Set Variable [ $r; Value:MBS("DynaPDF.EndPage"; $pdf) ]
                          • Set Variable [ $r; Value:MBS("DynaPDF.AppendPage"; $pdf) ]
                          • Set Variable [ $r; Value:MBS("DynaPDF.Table.Draw"; $table; 50; 50; 742) ]
                          • Exit Loop If [ MBS("DynaPDF.Table.HaveMore"; $pdf) ≠ 1 ]
                          • End Loop
                          • End If
                          • Set Variable [ $r; Value:MBS("DynaPDF.EndPage"; $pdf) ]
                          • End If
                          • #Cleanup
                          • Set Field [ Tables::OutputPDF; MBS("DynaPDF.Save"; $pdf) ]
                          • Set Variable [ $r; Value:MBS("DynaPDF.Table.Release"; $table) ]
                          • Set Variable [ $r; Value:MBS("DynaPDF.Release"; $pdf) ]
                          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: [CreateTemplateTable]
                                Script NameInitDynaPDF
                                Run script with full access privilegesOff
                                Include In MenuNo
                                Layouts that use this script
                                  Scripts that use this script
                                  Script Definition
                                  Script Steps
                                  • #Locate DynaPDF library
                                  • Set Variable [ $databasePath; Value:Get(FilePath) ]
                                  • Set Variable [ $databasePath; Value:MBS("Path.FilemakerPathToNativePath"; $databasePath) ]
                                  • Set Variable [ $databasePath; Value:Substitute ( $databasePath ; ".fp7" ; ".fmp12") ]
                                  • Set Variable [ $databaseName; Value:Get(FileName) & ".fmp12" ]
                                  • If [ Get(SystemPlatform) = -2 ]
                                  • Set Variable [ $path; Value:Substitute ( $databasePath ; $databaseName ; "dynapdf.dll" ) ]
                                  • Else
                                  • Set Variable [ $path; Value:Substitute ( $databasePath ; $databaseName ; "dynapdf.dylib" ) ]
                                  • End If
                                  • #Initialize DynaPDF
                                  • Set Variable [ $r; Value:MBS( "DynaPDF.Initialize"; $path) ]
                                  • If [ $r ≠ "OK" ]
                                  • Show Custom Dialog [ Title: "DynaPDF failed to initialize"; Message: $r; Default Button: “OK”, Commit: “No”; Button 2: “Abbrechen”, Commit: “No” ]
                                  • Else
                                  • Set Variable [ $$DynaPDFInited; Value:1 ]
                                  • 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: Tables

                                                Used functions:




                                                Links
                                                MBS Xojo PDF Plugins