MBS FileMaker Plugin Example Databases

Catalog with tables

All examples are included with download of MBS FileMaker Plugin.

Catalog with tables.fmp12

Overview
Tables4
Relationships2
Layouts6
Scripts2
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
Result
1 field defined, 1 record
Result
Articles
5 fields defined, 6 records
Articles
Options
5 fields defined, 11 records
Options
Images
2 fields defined, 11 records
Images

Fields

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

      Table Name: Articles - 5 Fields
      Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
      HeadlineNormal, TextAuto-Enter:
      • Allow editing
      Validation:
      • Only during data entry
      Storage:
      • Repetitions: 1
      • Indexing: None
      • Automatically create indexes as needed
      • Index Language: German
          Description1Normal, TextAuto-Enter:
          • Allow editing
          Validation:
          • Only during data entry
          Storage:
          • Repetitions: 1
          • Indexing: None
          • Automatically create indexes as needed
          • Index Language: German
              Description2Normal, TextAuto-Enter:
              • Allow editing
              Validation:
              • Only during data entry
              Storage:
              • Repetitions: 1
              • Indexing: None
              • Automatically create indexes as needed
              • Index Language: German
                  Description3Normal, TextAuto-Enter:
                  • Allow editing
                  Validation:
                  • Only during data entry
                  Storage:
                  • Repetitions: 1
                  • Indexing: None
                  • Automatically create indexes as needed
                  • Index Language: German
                      IDNormal, NumberAuto-Enter:
                      • Allow editing
                      • Serial: Generate: On creation, Next value: 7, Increment: 1
                      Validation:
                      • Only during data entry
                      Storage:
                      • Repetitions: 1
                      • Indexing: All
                      • Index Language: German

                          Table Name: Options - 5 Fields
                          Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
                          ArticleNumberNormal, TextAuto-Enter:
                          • Allow editing
                          Validation:
                          • Only during data entry
                          Storage:
                          • Repetitions: 1
                          • Indexing: None
                          • Automatically create indexes as needed
                          • Index Language: German
                              LengthNormal, TextAuto-Enter:
                              • Allow editing
                              Validation:
                              • Only during data entry
                              Storage:
                              • Repetitions: 1
                              • Indexing: None
                              • Automatically create indexes as needed
                              • Index Language: German
                                  VENormal, TextAuto-Enter:
                                  • Allow editing
                                  Validation:
                                  • Only during data entry
                                  Storage:
                                  • Repetitions: 1
                                  • Indexing: None
                                  • Automatically create indexes as needed
                                  • Index Language: German
                                      PriceNormal, TextAuto-Enter:
                                      • Allow editing
                                      Validation:
                                      • Only during data entry
                                      Storage:
                                      • Repetitions: 1
                                      • Indexing: None
                                      • Automatically create indexes as needed
                                      • Index Language: German
                                          ArticleIDNormal, NumberAuto-Enter:
                                          • Allow editing
                                          Validation:
                                          • Only during data entry
                                          Storage:
                                          • Repetitions: 1
                                          • Indexing: All
                                          • Index Language: German

                                              Table Name: Images - 2 Fields
                                              Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
                                              ImageNormal, BinaryAuto-Enter:
                                              • Allow editing
                                              Validation:
                                              • Only during data entry
                                              Storage:
                                              • Repetitions: 1
                                                  ArticleIDNormal, NumberAuto-Enter:
                                                  • Allow editing
                                                  Validation:
                                                  • Only during data entry
                                                  Storage:
                                                  • Repetitions: 1
                                                  • Indexing: All
                                                  • Index Language: German

                                                      Relationship: Articles=Images

                                                      Table OccurrenceArticlesImages
                                                      FieldID=ArticleID
                                                      Source TableArticlesImages
                                                      Source FileCatalog with tables.fmp12Catalog with tables.fmp12
                                                      Allow creation of records via this relationshipOffOff
                                                      Delete related records in this table when a record is deleted in the other tableOffOff
                                                      Sort records

                                                      Off

                                                      Off

                                                      Layouts

                                                      Layout Hierarchy

                                                      Result
                                                      Articles
                                                      Options
                                                      Images


                                                      Layout NameInclude In MenuQuick Find# of ObjectsShow Records FromSave record changes automaticallyShow field frames when record is activeShow field frames only on current recordShow current record indicator in List ViewUsed in ScriptsCustom Menu SetScript TriggersTheme ID
                                                      ResultYesYes ResultOnOnOffOn [File Default]01
                                                      ArticlesYesYes ArticlesOnOnOffOn [File Default]01
                                                      OptionsYesYes OptionsOnOnOffOn [File Default]01
                                                      ImagesYesYes ImagesOnOnOffOn [File Default]01

                                                      Layout Objects: Result

                                                      Regular Fields

                                                      Field Name: Result::OutputPDF
                                                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                      • Top: 6 pt
                                                      • Left: 138 pt
                                                      • Bottom: 503 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 Calalog
                                                        Additional Properties:
                                                      • Change to hand cursor over button
                                                      • Rectangular
                                                      • Top: 6 pt
                                                      • Left: 564 pt
                                                      • Bottom: 31 pt
                                                      • Right: 727 pt
                                                      • Anchoring: Left, Top
                                                      Perform Script [ “CreateMainTable” ]

                                                      Scripts:


                                                      Layout Objects: Articles

                                                      Regular Fields

                                                      Field Name: Articles::Headline
                                                      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: Articles::Description1
                                                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                      • Top: 42 pt
                                                      • Left: 138 pt
                                                      • Bottom: 188 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
                                                      Yes

                                                      Field Name: Articles::Description2
                                                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                      • Top: 192 pt
                                                      • Left: 138 pt
                                                      • Bottom: 272 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
                                                      Yes

                                                      Field Name: Articles::Description3
                                                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                      • Top: 276 pt
                                                      • Left: 138 pt
                                                      • Bottom: 320 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
                                                      Yes

                                                      Field Name: Articles::ID
                                                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                      • Top: 324 pt
                                                      • Left: 138 pt
                                                      • Bottom: 338 pt
                                                      • Right: 217 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: Options::ArticleNumber
                                                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                      • Top: 343 pt
                                                      • Left: 27 pt
                                                      • Bottom: 358 pt
                                                      • Right: 158 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: Options::Length
                                                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                      • Top: 343 pt
                                                      • Left: 159 pt
                                                      • Bottom: 358 pt
                                                      • Right: 289 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: Options::VE
                                                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                      • Top: 343 pt
                                                      • Left: 290 pt
                                                      • Bottom: 358 pt
                                                      • Right: 421 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: Options::Price
                                                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                      • Top: 343 pt
                                                      • Left: 422 pt
                                                      • Bottom: 358 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
                                                      Yes

                                                      Field Name: Images::Image
                                                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                      • Top: 19 pt
                                                      • Left: 565 pt
                                                      • Bottom: 183 pt
                                                      • Right: 865 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: Go to Images for this Article
                                                        Additional Properties:
                                                      • Change to hand cursor over button
                                                      • Rectangular
                                                      • Top: 24 pt
                                                      • Left: 870 pt
                                                      • Bottom: 49 pt
                                                      • Right: 1087 pt
                                                      • Anchoring: Left, Top
                                                      Go to Related Record [ From table: “Images”; Using layout: “Images” (Images) ] [ Show only related records ]

                                                      Layouts:


                                                      Button PropertiesCoordinatesScript/Script Step
                                                        Type:
                                                      • Text: Go to Options for this Article
                                                        Additional Properties:
                                                      • Change to hand cursor over button
                                                      • Rectangular
                                                      • Top: 60 pt
                                                      • Left: 870 pt
                                                      • Bottom: 85 pt
                                                      • Right: 1087 pt
                                                      • Anchoring: Left, Top
                                                      Go to Related Record [ From table: “Options”; Using layout: “Options” (Options) ] [ Show only related records ]

                                                      Layouts:


                                                      Portals

                                                      Portal PropertiesCoordinatesFieldsOptions
                                                      • Top: 342 pt
                                                      • Left: 24 pt
                                                      • Bottom: 517 pt
                                                      • Right: 553 pt
                                                      • Anchoring: Left, Top
                                                      Field Objects
                                                      • Sort records: Off
                                                      • Filter calculation: None
                                                      • Initial Row: 1
                                                      • Number of Rows: 10

                                                      Portal PropertiesCoordinatesFieldsOptions
                                                      • Top: 18 pt
                                                      • Left: 564 pt
                                                      • Bottom: 517 pt
                                                      • Right: 865 pt
                                                      • Anchoring: Left, Top
                                                      Field Objects
                                                      • Sort records: Off
                                                      • Filter calculation: None
                                                      • Initial Row: 1
                                                      • Number of Rows: 3

                                                      Layout Objects: Options

                                                      Regular Fields

                                                      Field Name: Options::ArticleNumber
                                                      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: Options::Length
                                                      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: Options::VE
                                                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                      • Top: 60 pt
                                                      • Left: 138 pt
                                                      • Bottom: 74 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: Options::Price
                                                      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: Options::ArticleID
                                                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                      • Top: 96 pt
                                                      • Left: 138 pt
                                                      • Bottom: 110 pt
                                                      • Right: 217 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

                                                      Layout Objects: Images

                                                      Regular Fields

                                                      Field Name: Images::Image
                                                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                      • Top: 24 pt
                                                      • Left: 138 pt
                                                      • Bottom: 149 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: Images::ArticleID
                                                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                      • Top: 150 pt
                                                      • Left: 138 pt
                                                      • Bottom: 164 pt
                                                      • Right: 217 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

                                                      Script Hierarchy

                                                      CreateMainTable
                                                      InitDynaPDF

                                                      Next Script: [InitDynaPDF]
                                                      Script NameCreateMainTable
                                                      Run script with full access privilegesOff
                                                      Include In MenuYes
                                                      Layouts that use this script
                                                      Scripts that use this script
                                                        Script Definition
                                                        Script Steps
                                                        • Set Error Capture [ On ]
                                                        • #Initialize DynaPDF if needed
                                                        • If [ MBS("DynaPDF.IsInitialized") ≠ 1 ]
                                                        • Perform Script [ “InitDynaPDF” ]
                                                        • End If
                                                        • #Clear current PDF document
                                                        • Set Variable [ $r; Value:MBS("Trace.ErrorsOnly") ]
                                                        • Set Variable [ $r; Value:MBS("Trace") ]
                                                        • Set Variable [ $pdf; Value:MBS("DynaPDF.New") ]
                                                        • Set Variable [ $r; Value:MBS("DynaPDF.SetPageCoords"; $pdf; "TopDown") ]
                                                        • Set Variable [ $i; Value:0 ]
                                                        • Set Variable [ $pageCount; Value:0 ]
                                                        • Set Variable [ $RowCount; Value:0 ]
                                                        • #Create Table
                                                        • Set Variable [ $table; Value:MBS("DynaPDF.Table.Create"; $pdf; 10; 2; 500; 10) ]
                                                        • Set Variable [ $r; Value:MBS("DynaPDF.Table.SetBorderWidth"; $table; -1; -1; 1; 1; 1; 1) ]
                                                        • Set Variable [ $r; Value:MBS("DynaPDF.Table.SetRGBColor"; $table; -1; -1; "BorderColor"; 255; 255; 255) ]
                                                        • Set Variable [ $r; Value:MBS("DynaPDF.Table.SetRGBColor"; $table; -1; -1; "GridHorzColor"; 255; 255; 255) ]
                                                        • Set Variable [ $r; Value:MBS("DynaPDF.Table.SetRGBColor"; $table; -1; -1; "GridVertColor"; 255; 255; 255) ]
                                                        • // Set Variable [ $r; Value:MBS("DynaPDF.Table.SetRGBColor"; $table; -1; -1; "BorderColor"; 255; 0; 0) ]
                                                        • Set Variable [ $r; Value:MBS("DynaPDF.Table.SetRGBColor"; $table; -1; -1; "TextColor"; 0; 0; 0) ]
                                                        • Set Variable [ $r; Value:MBS("DynaPDF.Table.SetGridWidth"; $table; 10; 10) ]
                                                        • Set Variable [ $r; Value:MBS("DynaPDF.Table.SetColWidth"; $table; 0; 200;1) ]
                                                        • Set Variable [ $r; Value:MBS("DynaPDF.Table.SetColWidth"; $table; 1; 300;1) ]
                                                        • Set Variable [ $r; Value:MBS("DynaPDF.Table.SetFont"; $table; -1; -1; "Helvetica"; 0; 1; "unicode") ]
                                                        • Set Variable [ $r; Value:MBS("DynaPDF.Table.SetFontSize"; $table; -1; -1; 10) ]
                                                        • #Add Rows
                                                        • Go to Layout [ “Articles” (Articles) ]
                                                        • Go to Record/Request/Page [ First ]
                                                        • Loop
                                                        • Set Variable [ $row; Value:MBS("DynaPDF.Table.AddRow"; $table) ]
                                                        • #Bilder
                                                        • Set Variable [ $subtable; Value:MBS("DynaPDF.Table.Create"; $pdf; 10; 1; 200; 10) ]
                                                        • Set Variable [ $r; Value:MBS("DynaPDF.Table.SetGridWidth"; $subtable; 10; 10) ]
                                                        • // Set Variable [ $r; Value:MBS("DynaPDF.Table.SetBorderWidth"; $subtable; -1; -1; 1; 1; 1; 1) ]
                                                        • Set Variable [ $r; Value:MBS("DynaPDF.Table.SetRGBColor"; $subtable; -1; -1; "BorderColor"; 255; 255; 255) ]
                                                        • Set Variable [ $r; Value:MBS("DynaPDF.Table.SetRGBColor"; $subtable; -1; -1; "GridHorzColor"; 255; 255; 255) ]
                                                        • Set Variable [ $r; Value:MBS("DynaPDF.Table.SetRGBColor"; $subtable; -1; -1; "GridVertColor"; 255; 255; 255) ]
                                                        • Go to Related Record [ From table: “Images”; Using layout: “Images” (Images) ] [ Show only related records ]
                                                        • Set Variable [ $e1; Value:Get ( LastError ) ]
                                                        • Set Variable [ $NumberOfImages; Value:0 ]
                                                        • If [ $e1 = 0 and Get ( FoundCount ) >0 ]
                                                        • Set Variable [ $NumberOfImages; Value:Get ( FoundCount ) ]
                                                        • Go to Record/Request/Page [ First ]
                                                        • Loop
                                                        • Set Variable [ $subrow; Value:MBS("DynaPDF.Table.AddRow"; $subtable) ]
                                                        • Set Variable [ $r; Value:MBS("DynaPDF.Table.SetCellImageEx"; $subtable; $subrow; 0; 1; "left"; "top"; 200; 0; Images::Image) ]
                                                        • Go to Record/Request/Page [ Next; Exit after last ]
                                                        • End Loop
                                                        • End If
                                                        • Go to Related Record [ From table: “Articles”; Using layout: “Articles” (Articles) ]
                                                        • Set Variable [ $r; Value:MBS("DynaPDF.Table.SetCellTable"; $table; $row; 0; "left"; "top"; $subtable) ]
                                                        • Set Variable [ $r; Value:MBS("DynaPDF.Table.Release"; $subtable) ]
                                                        • #Texte
                                                        • Set Variable [ $subtable; Value:MBS("DynaPDF.Table.Create"; $pdf; 10; 1; 300; 1) ]
                                                        • // Set Variable [ $r; Value:MBS("DynaPDF.Table.SetRGBColor"; $subtable; -1; -1; "BorderColor"; 255; 0; 0) ]
                                                        • Set Variable [ $r; Value:MBS("DynaPDF.Table.SetRGBColor"; $subtable; -1; -1; "GridHorzColor"; 255; 255; 255) ]
                                                        • Set Variable [ $r; Value:MBS("DynaPDF.Table.SetRGBColor"; $subtable; -1; -1; "GridVertColor"; 255; 255; 255) ]
                                                        • Set Variable [ $r; Value:MBS("DynaPDF.Table.SetGridWidth"; $subtable; 10; 10) ]
                                                        • // Set Variable [ $r; Value:MBS("DynaPDF.Table.SetBorderWidth"; $subtable; -1; -1; 1; 1; 1; 1) ]
                                                        • Set Variable [ $subrow; Value:MBS("DynaPDF.Table.AddRow"; $subtable) ]
                                                        • Set Variable [ $r; Value:MBS("DynaPDF.Table.SetCellText"; $subtable; $subrow; 0; "left"; "top"; Articles::Headline) ]
                                                        • Set Variable [ $r; Value:MBS("DynaPDF.Table.SetFont"; $subtable; $subrow; -1; "Helvetica"; "bold"; 1; "unicode") ]
                                                        • Set Variable [ $r; Value:MBS("DynaPDF.Table.SetFontSize"; $subtable; $subrow; -1; 13) ]
                                                        • If [ Length(Articles::Description1)>0 ]
                                                        • Set Variable [ $subrow; Value:MBS("DynaPDF.Table.AddRow"; $subtable) ]
                                                        • Set Variable [ $r; Value:MBS("DynaPDF.Table.SetCellText"; $subtable; $subrow; 0; "left"; "top"; Articles::Description1) ]
                                                        • End If
                                                        • If [ Length(Articles::Description2)>0 ]
                                                        • Set Variable [ $subrow; Value:MBS("DynaPDF.Table.AddRow"; $subtable) ]
                                                        • Set Variable [ $r; Value:MBS("DynaPDF.Table.SetCellText"; $subtable; $subrow; 0; "left"; "top"; Articles::Description2) ]
                                                        • End If
                                                        • If [ Length(Articles::Description3)>0 ]
                                                        • Set Variable [ $subrow; Value:MBS("DynaPDF.Table.AddRow"; $subtable) ]
                                                        • Set Variable [ $r; Value:MBS("DynaPDF.Table.SetCellText"; $subtable; $subrow; 0; "left"; "top"; Articles::Description3) ]
                                                        • End If
                                                        • // Set Variable [ $subrow; Value:MBS("DynaPDF.Table.AddRow"; $subtable) ]
                                                        • // Set Variable [ $r; Value:MBS("DynaPDF.Table.SetCellText"; $subtable; $subrow; 0; "left"; "top"; GetAsNumber($NumberOfImages) & " images") ]
                                                        • #Details
                                                        • Go to Related Record [ From table: “Options”; Using layout: “Options” (Options) ] [ Show only related records ]
                                                        • Set Variable [ $e2; Value:Get ( LastError ) ]
                                                        • Set Variable [ $NumberOfOptions; Value:0 ]
                                                        • If [ $e2 = 0 and Get ( FoundCount ) >0 ]
                                                        • Set Variable [ $dtable; Value:MBS("DynaPDF.Table.Create"; $pdf; 10; 4; 290; 1) ]
                                                        • Set Variable [ $r; Value:MBS("DynaPDF.Table.SetRGBColor"; $dtable; -1; -1; "GridHorzColor"; 255; 255; 255) ]
                                                        • Set Variable [ $r; Value:MBS("DynaPDF.Table.SetRGBColor"; $dtable; -1; -1; "GridVertColor"; 255; 255; 255) ]
                                                        • Set Variable [ $r; Value:MBS("DynaPDF.Table.SetRGBColor"; $dtable; -1; -1; "BorderColor"; 255; 255; 255) ]
                                                        • Set Variable [ $r; Value:MBS("DynaPDF.Table.SetGridWidth"; $dtable; 0; 0) ]
                                                        • // Set Variable [ $r; Value:MBS("DynaPDF.Table.SetRGBColor"; $dtable; -1; -1; "GridHorzColor"; 255; 0; 0) ]
                                                        • // Set Variable [ $r; Value:MBS("DynaPDF.Table.SetRGBColor"; $dtable; -1; -1; "GridVertColor"; 0; 255; 0) ]
                                                        • // Set Variable [ $r; Value:MBS("DynaPDF.Table.SetRGBColor"; $dtable; -1; -1; "BorderColor"; 0; 0; 255) ]
                                                        • // Set Variable [ $r; Value:MBS("DynaPDF.Table.SetGridWidth"; $dtable; 2; 2) ]
                                                        • Set Variable [ $r; Value:MBS("DynaPDF.Table.SetCellPadding"; $dtable; -1; -1; 1; 1; 1; 1) ]
                                                        • // Set Variable [ $r; Value:MBS("DynaPDF.Table.SetBorderWidth"; $subtable; -1; -1; 1; 1; 1; 1) ]
                                                        • Set Variable [ $drow; Value:MBS("DynaPDF.Table.AddRow"; $dtable) ]
                                                        • Set Variable [ $r; Value:MBS("DynaPDF.Table.SetFlags"; $dtable; $drow; -1; "HeaderRow") ]
                                                        • Set Variable [ $r; Value:MBS("DynaPDF.Table.SetRGBColor"; $dtable; $drow; -1; "BackColor"; 161; 201; 129) ]
                                                        • Set Variable [ $r; Value:MBS("DynaPDF.Table.SetCellText"; $dtable; $drow; 0; "left"; "top"; "ArticleNumber") ]
                                                        • Set Variable [ $r; Value:MBS("DynaPDF.Table.SetCellText"; $dtable; $drow; 1; "right"; "top"; "Length") ]
                                                        • Set Variable [ $r; Value:MBS("DynaPDF.Table.SetCellText"; $dtable; $drow; 2; "right"; "top"; "VE") ]
                                                        • Set Variable [ $r; Value:MBS("DynaPDF.Table.SetCellText"; $dtable; $drow; 3; "right"; "top"; "Price") ]
                                                        • Set Variable [ $NumberOfOptions; Value:Get ( FoundCount ) ]
                                                        • Set Variable [ $n; Value:0 ]
                                                        • Go to Record/Request/Page [ First ]
                                                        • Loop
                                                        • Set Variable [ $drow; Value:MBS("DynaPDF.Table.AddRow"; $dtable) ]
                                                        • If [ $n = 0 ]
                                                        • Set Variable [ $r; Value:MBS("DynaPDF.Table.SetRGBColor"; $dtable; $drow; -1; "BackColor"; 225; 225; 225) ]
                                                        • End If
                                                        • Set Variable [ $r; Value:MBS("DynaPDF.Table.SetCellText"; $dtable; $drow; 0; "left"; "top"; Options::ArticleNumber) ]
                                                        • Set Variable [ $r; Value:MBS("DynaPDF.Table.SetCellText"; $dtable; $drow; 1; "right"; "top"; Options::Length) ]
                                                        • Set Variable [ $r; Value:MBS("DynaPDF.Table.SetCellText"; $dtable; $drow; 2; "right"; "top"; Options::VE) ]
                                                        • Set Variable [ $r; Value:MBS("DynaPDF.Table.SetCellText"; $dtable; $drow; 3; "right"; "top"; Options::Price) ]
                                                        • Go to Record/Request/Page [ Next; Exit after last ]
                                                        • Set Variable [ $n; Value:If($n = 0; 1; 0) ]
                                                        • End Loop
                                                        • Set Variable [ $subrow; Value:MBS("DynaPDF.Table.AddRow"; $subtable) ]
                                                        • Set Variable [ $r; Value:MBS("DynaPDF.Table.SetCellTable"; $subtable; $subrow; 0; "center"; "center"; $dtable) ]
                                                        • End If
                                                        • // Set Variable [ $subrow; Value:MBS("DynaPDF.Table.AddRow"; $subtable) ]
                                                        • // Set Variable [ $r; Value:MBS("DynaPDF.Table.SetCellText"; $subtable; $subrow; 0; "left"; "top"; GetAsNumber($NumberOfOptions) & " options") ]
                                                        • #Rechte Tabelle einfügen
                                                        • Set Variable [ $r; Value:MBS("DynaPDF.Table.SetCellTable"; $table; $row; 1; "left"; "top"; $subtable) ]
                                                        • Set Variable [ $r; Value:MBS("DynaPDF.Table.Release"; $subtable) ]
                                                        • #Nächster Artikel
                                                        • Go to Related Record [ From table: “Articles”; Using layout: “Articles” (Articles) ]
                                                        • Go to Record/Request/Page [ Next; Exit after last ]
                                                        • End Loop
                                                        • #Draw Table
                                                        • Set Variable [ $PageNumber; Value:1 ]
                                                        • Set Variable [ $pageWidth; Value:MBS("DynaPDF.GetPageWidth"; $pdf) ]
                                                        • Set Variable [ $pageHeight; Value:MBS("DynaPDF.GetPageHeight"; $pdf) ]
                                                        • Loop
                                                        • Set Variable [ $r; Value:MBS("DynaPDF.AppendPage"; $pdf) ]
                                                        • If [ Mod ( $PageNumber; 2 ) = 0 ]
                                                        • #even
                                                        • Set Variable [ $r; Value:MBS( "DynaPDF.SetFont"; $pdf; "Helvetica"; 0; 20) ]
                                                        • Set Variable [ $r; Value:MBS( "DynaPDF.WriteFTextEx"; $pdf; 50; 30; $pageWidth-100; 30; "right"; "Our Catalog") ]
                                                        • Set Variable [ $r; Value:MBS( "DynaPDF.SetFont"; $pdf; "Helvetica"; 0; 12) ]
                                                        • Set Variable [ $r; Value:MBS( "DynaPDF.WriteFTextEx"; $pdf; 50; $pageHeight - 30; $pageWidth-100; 30; "right"; GetAsText($PageNumber)) ]
                                                        • Else
                                                        • #odd
                                                        • Set Variable [ $r; Value:MBS( "DynaPDF.SetFont"; $pdf; "Helvetica"; 0; 20) ]
                                                        • Set Variable [ $r; Value:MBS( "DynaPDF.WriteFTextEx"; $pdf; 50; 30; $pageWidth-100; 30; "left"; "Our Catalog") ]
                                                        • Set Variable [ $r; Value:MBS( "DynaPDF.SetFont"; $pdf; "Helvetica"; 0; 12) ]
                                                        • Set Variable [ $r; Value:MBS( "DynaPDF.WriteFTextEx"; $pdf; 50; $pageHeight - 30; $pageWidth-100; 30; "left"; GetAsText($PageNumber)) ]
                                                        • End If
                                                        • Set Variable [ $r; Value:MBS("DynaPDF.Table.Draw"; $table; 50; 70; 742) ]
                                                        • Set Variable [ $r; Value:MBS("DynaPDF.EndPage"; $pdf) ]
                                                        • Exit Loop If [ MBS("DynaPDF.Table.HaveMore"; $table) ≠ 1 ]
                                                        • Set Variable [ $PageNumber; Value:$PageNumber +1 ]
                                                        • Exit Loop If [ $PageNumber > 10 ]
                                                        • End Loop
                                                        • #Cleanup
                                                        • Go to Layout [ “Result” (Result) ]
                                                        • Set Field [ Result::OutputPDF; MBS("DynaPDF.Save"; $pdf) ]
                                                        • Export Field Contents [ Result::OutputPDF; “file:test.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: [CreateMainTable]
                                                            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: Catalog with tables

                                                                            Used functions:




                                                                            Links
                                                                            MBS FileMaker blog