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

MBS FileMaker Plugin Example Databases

Query Paper Formats and Sources

All examples are included with download of MBS FileMaker Plugin.

Query Paper Formats and Sources.fmp12

Overview
Tables1
Relationships0
Layouts1
Scripts1
Value Lists0
Custom Functions0
Custom Menus0
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
Table
3 fields defined, 1 record
Table

Fields

Table Name: Table - 3 Fields
Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
Printer NameNormal, TextAuto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Repetitions: 1
  • Indexing: None
  • Automatically create indexes as needed
  • Index Language: German
      Paper SourcesNormal, TextAuto-Enter:
      • Allow editing
      Validation:
      • Only during data entry
      Storage:
      • Repetitions: 1
      • Indexing: None
      • Automatically create indexes as needed
      • Index Language: German
          Paper FormatsNormal, TextAuto-Enter:
          • Allow editing
          Validation:
          • Only during data entry
          Storage:
          • Repetitions: 1
          • Indexing: None
          • Automatically create indexes as needed
          • Index Language: German

              Layout Objects: Table

              Regular Fields

              Field Name: Table::Printer Name
              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
              • Top: 64 pt
              • Left: 121 pt
              • Bottom: 86 pt
              • Right: 374 pt
              • Anchoring: Left, Top
              Field Format:
              • Edit Box
              Field Behavior:
              • Allow field to be entered: In Find mode, In Browse mode
              • Touch keyboard type: Default for Data Type
              • Go to next field using: Tab key
              Yes

              Field Name: Table::Paper Sources
              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
              • Top: 88 pt
              • Left: 121 pt
              • Bottom: 173 pt
              • Right: 374 pt
              • Anchoring: Left, Top
              Field Format:
              • Edit Box
              Field Behavior:
              • Allow field to be entered: In Find mode, In Browse mode
              • Touch keyboard type: Default for Data Type
              • Go to next field using: Tab key
              Yes

              Field Name: Table::Paper Formats
              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
              • Top: 173 pt
              • Left: 121 pt
              • Bottom: 258 pt
              • Right: 374 pt
              • Anchoring: Left, Top
              Field Format:
              • Edit Box
              Field Behavior:
              • Allow field to be entered: In Find mode, In Browse mode
              • Touch keyboard type: Default for Data Type
              • Go to next field using: Tab key
              Yes

              Buttons

              Button PropertiesCoordinatesScript/Script Step
                Type:
              • Text: List Printers
              • Top: 13 pt
              • Left: 32 pt
              • Bottom: 36 pt
              • Right: 143 pt
              • Anchoring: Left, Top
              Perform Script [ “List Printers and Options” ]

              Scripts:


              Script Hierarchy

              List Printers and Options

              Script NameList Printers and Options
              Run script with full access privilegesOff
              Include In MenuYes
              Layouts that use this script
              Scripts that use this script
                Script Definition
                Script Steps
                • #Query current state, by setting printer and paper format to ? which is probably not a real format.
                • If [ Get ( FoundCount ) = 0 ]
                • #we need at least one record for FileMaker to show print dialog
                • New Record/Request
                • Commit Records/Requests [ No dialog ]
                • End If
                • Set Variable [ $r; Value:MBS("Printer.Print"; "?"; 2; ""; "?") ]
                • Pause/Resume Script [ Duration (seconds): 2 ]
                • Set Variable [ $status; Value:MBS("Printer.ErrorLog") ]
                • #What is selected?
                • Set Variable [ $CurrentPrinterName; Value:MBS("Printer.CurrentPrinterName") ]
                • Set Variable [ $CurrentPrintWhat; Value:MBS( "Printer.CurrentPrintWhat" ) ]
                • Set Variable [ $CurrentPrintWhatIndex; Value:MBS( "Printer.CurrentPrintWhat";1 ) ]
                • Set Variable [ $CurrentPaperFormat; Value:MBS( "Printer.CurrentPaperFormat" ) ]
                • Set Variable [ $CurrentPaperSource; Value:MBS( "Printer.CurrentPaperSource" ) ]
                • #loop over printers
                • Set Variable [ $printers; Value:MBS( "Printer.PrinterNames" ) ]
                • Set Variable [ $count; Value:ValueCount ( $printers ) ]
                • Set Variable [ $index; Value:1 ]
                • Loop
                • Set Variable [ $printer; Value:GetValue($printers; $index) ]
                • #show dialog and check options
                • Set Variable [ $r; Value:MBS("Printer.Print"; $printer; 2; ""; "?") ]
                • Pause/Resume Script [ Duration (seconds): 2 ]
                • Set Variable [ $status; Value:MBS("Printer.ErrorLog") ]
                • #Store in record
                • New Record/Request
                • Set Field [ Table::Printer Name; $printer ]
                • Set Field [ Table::Paper Sources; MBS( "Printer.PaperSources" ) ]
                • Set Field [ Table::Paper Formats; MBS( "Printer.PaperFormats" ) ]
                • Commit Records/Requests [ Skip data entry validation ]
                • #next
                • Set Variable [ $index; Value:$index + 1 ]
                • Exit Loop If [ $index > $count ]
                • End Loop
                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: Query Paper Formats and Sources

                        Used functions: