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

MBS FileMaker Plugin Example Databases

Catalog with tables

All examples are included with download of MBS FileMaker Plugin.

Catalog with tables.fmp12

Overview
Tables 4
Relationships 2
Layouts 6
Scripts 3
Value Lists 0
Custom Functions 0
Custom Menus 33
File Options
Default custom menu set [Standard FileMaker Menus]
Default theme Minimalistisch
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
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 Name Type Options Comments On Layouts In Relationships In Scripts In Value Lists
OutputPDF Normal, Binary Auto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Repetitions: 1

      Table Name: Articles - 5 Fields
      Field Name Type Options Comments On Layouts In Relationships In Scripts In Value Lists
      Headline Normal, Text Auto-Enter:
      • Allow editing
      Validation:
      • Only during data entry
      Storage:
      • Repetitions: 1
      • Indexing: None
      • Automatically create indexes as needed
      • Index Language: German
          Description1 Normal, Text Auto-Enter:
          • Allow editing
          Validation:
          • Only during data entry
          Storage:
          • Repetitions: 1
          • Indexing: None
          • Automatically create indexes as needed
          • Index Language: German
              Description2 Normal, Text Auto-Enter:
              • Allow editing
              Validation:
              • Only during data entry
              Storage:
              • Repetitions: 1
              • Indexing: None
              • Automatically create indexes as needed
              • Index Language: German
                  Description3 Normal, Text Auto-Enter:
                  • Allow editing
                  Validation:
                  • Only during data entry
                  Storage:
                  • Repetitions: 1
                  • Indexing: None
                  • Automatically create indexes as needed
                  • Index Language: German
                      ID Normal, Number Auto-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 Name Type Options Comments On Layouts In Relationships In Scripts In Value Lists
                          ArticleNumber Normal, Text Auto-Enter:
                          • Allow editing
                          Validation:
                          • Only during data entry
                          Storage:
                          • Repetitions: 1
                          • Indexing: None
                          • Automatically create indexes as needed
                          • Index Language: German
                              Length Normal, Text Auto-Enter:
                              • Allow editing
                              Validation:
                              • Only during data entry
                              Storage:
                              • Repetitions: 1
                              • Indexing: None
                              • Automatically create indexes as needed
                              • Index Language: German
                                  VE Normal, Text Auto-Enter:
                                  • Allow editing
                                  Validation:
                                  • Only during data entry
                                  Storage:
                                  • Repetitions: 1
                                  • Indexing: None
                                  • Automatically create indexes as needed
                                  • Index Language: German
                                      Price Normal, Text Auto-Enter:
                                      • Allow editing
                                      Validation:
                                      • Only during data entry
                                      Storage:
                                      • Repetitions: 1
                                      • Indexing: None
                                      • Automatically create indexes as needed
                                      • Index Language: German
                                          ArticleID Normal, Number Auto-Enter:
                                          • Allow editing
                                          Validation:
                                          • Only during data entry
                                          Storage:
                                          • Repetitions: 1
                                          • Indexing: All
                                          • Index Language: German

                                              Table Name: Images - 2 Fields
                                              Field Name Type Options Comments On Layouts In Relationships In Scripts In Value Lists
                                              Image Normal, Binary Auto-Enter:
                                              • Allow editing
                                              Validation:
                                              • Only during data entry
                                              Storage:
                                              • Repetitions: 1
                                                  ArticleID Normal, Number Auto-Enter:
                                                  • Allow editing
                                                  Validation:
                                                  • Only during data entry
                                                  Storage:
                                                  • Repetitions: 1
                                                  • Indexing: All
                                                  • Index Language: German

                                                      Relationship: Articles=Images

                                                      Table Occurrence Articles Images
                                                      Field ID = ArticleID
                                                      Source Table Articles Images
                                                      Source File Catalog with tables.fmp12 Catalog with tables.fmp12
                                                      Allow creation of records via this relationship Off Off
                                                      Delete related records in this table when a record is deleted in the other table Off Off
                                                      Sort records

                                                      Off

                                                      Off

                                                      Layouts

                                                      Layout Hierarchy

                                                      Result
                                                      Articles
                                                      Options
                                                      Images


                                                      Layout Name Include In Menu Quick Find # of Objects Show Records From Save record changes automatically Show field frames when record is active Show field frames only on current record Show current record indicator in List View Used in Scripts Custom Menu Set Script Triggers Theme ID
                                                      Result Yes Yes Result On On Off On [File Default] 02
                                                      Articles Yes Yes Articles On On Off On [File Default] 01
                                                      Options Yes Yes Options On On Off On [File Default] 01
                                                      Images Yes Yes Images On On Off On [File Default] 01

                                                      Layout Objects: Result

                                                      Regular Fields

                                                      Field Name: Result::OutputPDF
                                                      Field Properties Coordinates Field Format Field Behavior Quick 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

                                                      Buttons

                                                      Button Properties Coordinates Script/Script Step
                                                        Type:
                                                      • Text: Create Catalog
                                                      • Top: 9 pt
                                                      • Left: 562 pt
                                                      • Bottom: 40 pt
                                                      • Right: 722 pt
                                                      • Anchoring: Left, Top
                                                      Perform Script [ “CreateMainTable” ]

                                                      Scripts:


                                                      Layout Objects: Articles

                                                      Regular Fields

                                                      Field Name: Articles::Headline
                                                      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: Articles::Description1
                                                      Field Properties Coordinates Field Format Field Behavior Quick 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 Properties Coordinates Field Format Field Behavior Quick 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 Properties Coordinates Field Format Field Behavior Quick 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 Properties Coordinates Field Format Field Behavior Quick 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 Properties Coordinates Field Format Field Behavior Quick 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 Properties Coordinates Field Format Field Behavior Quick 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 Properties Coordinates Field Format Field Behavior Quick 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 Properties Coordinates Field Format Field Behavior Quick 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 Properties Coordinates Field Format Field Behavior Quick 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 Properties Coordinates Script/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 Properties Coordinates Script/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 Properties Coordinates Fields Options
                                                      • 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 Properties Coordinates Fields Options
                                                      • 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 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: Options::Length
                                                      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: Options::VE
                                                      Field Properties Coordinates Field Format Field Behavior Quick 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 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: Options::ArticleID
                                                      Field Properties Coordinates Field Format Field Behavior Quick 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 Properties Coordinates Field Format Field Behavior Quick 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 Properties Coordinates Field Format Field Behavior Quick 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
                                                      Clear
                                                      InitDynaPDF

                                                      Next Script: [Clear]
                                                      Script Name CreateMainTable
                                                      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
                                                        • 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; "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; 206;1) ]
                                                        • Set Variable [ $r; Value:MBS("DynaPDF.Table.SetColWidth"; $table; 1; 306;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) ]
                                                        • #enable color for debugging
                                                        • // Set Variable [ $r; Value:MBS("DynaPDF.Table.SetRGBColor"; $table; -1; -1; "BorderColor"; 255; 0; 0) ]
                                                        • #Add Rows
                                                        • Go to Layout [ “Articles” (Articles) ]
                                                        • Go to Record/Request/Page [ First ]
                                                        • Loop [ Flush: Always ]
                                                        • 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) ]
                                                        • #enable color for debugging
                                                        • // 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 [ Flush: Always ]
                                                        • 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) ]
                                                        • #enable color for debugging
                                                        • // 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) ]
                                                        • #enable color for debugging
                                                        • // 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) ]
                                                        • #enable color for debugging
                                                        • // 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.SetBorderWidth"; $subtable; -1; -1; 1; 1; 1; 1) ]
                                                        • Set Variable [ $r; Value:MBS("DynaPDF.Table.SetCellPadding"; $dtable; -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 [ Flush: Always ]
                                                        • 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
                                                        • #add details table to text table
                                                        • Set Variable [ $subrow; Value:MBS("DynaPDF.Table.AddRow"; $subtable) ]
                                                        • Set Variable [ $r; Value:MBS("DynaPDF.Table.SetCellTable"; $subtable; $subrow; 0; "center"; "center"; $dtable) ]
                                                        • Set Variable [ $r; Value:MBS("DynaPDF.Table.Release"; $dtable) ]
                                                        • End If
                                                        • #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 [ Flush: Always ]
                                                        • 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”; Create folders:No ]
                                                        • 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] Next Script: [InitDynaPDF]
                                                            Script Name Clear
                                                            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
                                                                • Replace Field Contents [ Result::OutputPDF; Replace with calculation: "" ] [ No dialog ]
                                                                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: [Clear]
                                                                        Script Name InitDynaPDF
                                                                        Run script with full access privileges Off
                                                                        Siri Shortcut Visible Off
                                                                        Include In Menu No
                                                                        Layouts that use this script
                                                                          Scripts that use this script
                                                                          Script Definition
                                                                          Script Steps
                                                                          • #Locate DynaPDF library
                                                                          • #you can have libraries in container and export at runtime to folder of your choice.
                                                                          • #Or install library somewhere and pass path.
                                                                          • #If library is in same folder as plugin, you can only pass only file name.
                                                                          • If [ MBS("IsServer") ]
                                                                          • #Put the path you use for your server here:
                                                                          • If [ Get(SystemPlatform) = -2 ]
                                                                          • #Server on Windows
                                                                          • Set Variable [ $path; Value:"C:\Programs\FileMaker Server\dynapdf.dll" ]
                                                                          • Else If [ MBS("IsLinux") ]
                                                                          • #Server on Linux for FileMaker Cloud
                                                                          • Set Variable [ $path; Value:"/opt/FileMaker/FileMaker Server/dynapdf.linux.so" ]
                                                                          • Else [ ]
                                                                          • #Server on Mac
                                                                          • Set Variable [ $path; Value: "/Library/FileMaker Server/dynapdf.dylib" ]
                                                                          • End If
                                                                          • Else [ ]
                                                                          • #For desktop and our examples we look in same folder as database:
                                                                          • 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" ) ]
                                                                          • #plugin will look for dynapdf.dll and if not found also for dynapdf.dll (64-bit) and dynapdf32.dll (32-bit).
                                                                          • Else [ ]
                                                                          • Set Variable [ $path; Value:Substitute ( $databasePath ; $databaseName ; "dynapdf.dylib" ) ]
                                                                          • #Mac dylib is usually 32 and 64 bit together.
                                                                          • End If
                                                                          • End If
                                                                          • #You can test for free.
                                                                          • #If you like to get a dynapdf license, please follow links on our pricing page:
                                                                          • #https://www.monkeybreadsoftware.de/filemaker/pricing.shtml
                                                                          • Set Variable [ $LicenseKey; Value:"" // put your key here or leave empty for demo. // Use e.g. "Lite", "Pro" or "Starter" to use demo mode for just that mode. ]
                                                                          • Set Variable [ $r; Value:MBS( "DynaPDF.Initialize"; $path; $LicenseKey) ]
                                                                          • If [ $r ≠ "OK" ]
                                                                          • Show Custom Dialog [ Title: "Error"; Message: $r; Default Button: “OK”, Commit: “No”; Button 2: “Cancel”, Commit: “No” ]
                                                                          • Halt Script
                                                                          • 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: