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

MBS FileMaker Plugin Example Databases

QuickLook Preview Panel

All examples are included with download of MBS FileMaker Plugin.

QuickLook Preview Panel.fmp12

Overview
Tables1
Relationships0
Layouts1
Scripts3
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
OnFirstWindowOpenScript: Init
OnLastWindowCloseScript: Clear
OnWindowOpenOff
OnWindowCloseOff
OnFileAVPlayerChangeOff
Thumbnail Settings
Generate ThumbnailsOn; Temporary

 

Tables

Table Name
Statistics
Occurrences in Relationship Graph
QuickLook Preview Panel
3 fields defined, 21 records
QuickLook Preview Panel

Fields

Table Name: QuickLook Preview Panel - 3 Fields
Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
FilePathNormal, TextAuto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Repetitions: 1
  • Indexing: None
  • Automatically create indexes as needed
  • Index Language: German
      ImageContainerNormal, BinaryAuto-Enter:
      • Allow editing
      Validation:
      • Only during data entry
      Storage:
      • Repetitions: 1
          PDFContainerNormal, BinaryAuto-Enter:
          • Allow editing
          Validation:
          • Only during data entry
          Storage:
          • Repetitions: 1

              Layout Objects: QuickLook Preview Panel

              Regular Fields

              Field Name: QuickLook Preview Panel::FilePath
              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
              • Top: 54 pt
              • Left: 138 pt
              • Bottom: 68 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: QuickLook Preview Panel::ImageContainer
              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
              • Top: 72 pt
              • Left: 138 pt
              • Bottom: 197 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: QuickLook Preview Panel::PDFContainer
              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
              • Top: 198 pt
              • Left: 138 pt
              • Bottom: 323 pt
              • Right: 391 pt
              • Anchoring: Left, Top
              Field Format:
              • Edit Box
              Field Behavior:
              • Allow field to be entered: In Find mode, In Browse mode
              • Touch keyboard type: System Default
              • Go to next field using: Tab key
              No

              Group Buttons

              Button PropertiesCoordinatesScript/Script Step
                Type:
              • Text: Run Preview
                Additional Properties:
              • Change to hand cursor over button
              • Rectangular
              • Top: 12 pt
              • Left: 96 pt
              • Bottom: 37 pt
              • Right: 205 pt
              • Anchoring: Left, Top
              Perform Script [ “Run” ]

              Scripts:


              Script Hierarchy

              Run
              Clear
              Init

              Next Script: [Clear]
              Script NameRun
              Run script with full access privilegesOff
              Include In MenuYes
              Layouts that use this script
              Scripts that use this script
                Script Definition
                Script Steps
                • # Prepare
                • If [ MBS("QLPreviewPanel.IsVisible") ]
                • Set Variable [ $r; Value:MBS("QLPreviewPanel.Hide") ]
                • End If
                • Set Variable [ $r; Value:MBS("QLPreviewPanel.Clear") ]
                • # Add all records
                • Go to Record/Request/Page [ First ]
                • Loop
                • If [ Length(QuickLook Preview Panel::FilePath) > 0 ]
                • Set Variable [ $r; Value:MBS("QLPreviewPanel.AddFile"; QuickLook Preview Panel::FilePath) ]
                • End If
                • If [ not IsEmpty(QuickLook Preview Panel::ImageContainer) ]
                • Set Variable [ $r; Value:MBS("QLPreviewPanel.AddImage"; QuickLook Preview Panel::ImageContainer) ]
                • End If
                • If [ not IsEmpty(QuickLook Preview Panel::PDFContainer) ]
                • Set Variable [ $r; Value:MBS("QLPreviewPanel.AddPDF"; QuickLook Preview Panel::PDFContainer) ]
                • End If
                • Go to Record/Request/Page [ Next; Exit after last ]
                • End Loop
                • # Run it!
                • Set Variable [ $r; Value:MBS("QLPreviewPanel.Show") ]
                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: [Run]Next Script: [Init]
                        Script NameClear
                        Run script with full access privilegesOff
                        Include In MenuYes
                        Layouts that use this script
                          Scripts that use this script
                            Script Definition
                            Script Steps
                            Fields used in this script
                              Scripts used in this script
                                Layouts used in this script
                                  Tables used in this script
                                    Table occurrences used by this script
                                      Custom Functions used by this script
                                        Custom menu set used by this script

                                          Previous Script: [Clear]
                                          Script NameInit
                                          Run script with full access privilegesOff
                                          Include In MenuYes
                                          Layouts that use this script
                                            Scripts that use this script
                                              Script Definition
                                              Script Steps
                                              • #import desktop pictures if we have no pictures
                                              • Go to Layout [ “QuickLook Preview Panel” ]
                                              • If [ Get(FoundCount) = 0 ]
                                              • Set Variable [ $folder; Value:"/Library/Desktop Pictures" ]
                                              • Set Variable [ $list; Value:MBS( "Files.List"; $folder; 1 ) ]
                                              • If [ MBS("isError") = 0 ]
                                              • #loop counting up from 1 to $count
                                              • Set Variable [ $count; Value:ValueCount ( $list ) ]
                                              • Set Variable [ $index; Value:1 ]
                                              • If [ $index ≤ $count ]
                                              • Loop
                                              • #import one file path
                                              • Set Variable [ $name; Value:GetValue($list; $index) ]
                                              • Set Variable [ $path; Value:MBS( "Path.AddPathComponent"; $folder; $name) ]
                                              • New Record/Request
                                              • Set Field [ QuickLook Preview Panel::FilePath; $path ]
                                              • Commit Records/Requests [ No dialog ]
                                              • #next
                                              • Set Variable [ $index; Value:$index + 1 ]
                                              • Exit Loop If [ $index > $count ]
                                              • End Loop
                                              • End If
                                              • End If
                                              • 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: QuickLook Preview Panel

                                                    Used functions: