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

MBS FileMaker Plugin Example Databases

WebViewer Images

All examples are included with download of MBS FileMaker Plugin.

WebViewer Images.fmp12

Overview
Tables2
Relationships1
Layouts3
Scripts3
Value Lists0
Custom Functions0
Custom Menus32
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
Start
1 field defined, 1 record
Start
Images
3 fields defined, 0 record
Images

Fields

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

      Table Name: Images - 3 Fields
      Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
      URLNormal, TextAuto-Enter:
      • Allow editing
      Validation:
      • Only during data entry
      Storage:
      • Repetitions: 1
      • Indexing: None
      • Automatically create indexes as needed
      • Index Language: German
          ImageNormal, BinaryAuto-Enter:
          • Allow editing
          Validation:
          • Only during data entry
          Storage:
          • Repetitions: 1
              StartIDNormal, NumberAuto-Enter:
              • Allow editing
              Validation:
              • Only during data entry
              Storage:
              • Repetitions: 1
              • Indexing: All
              • Index Language: German

                  Layout Objects: Start

                  Regular Fields

                  Field Name: Images::URL
                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                  • Top: 46 pt
                  • Left: 537 pt
                  • Bottom: 65 pt
                  • Right: 849 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: Images::Image
                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                  • Top: 65 pt
                  • Left: 537 pt
                  • Bottom: 196 pt
                  • Right: 849 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
                  No

                  Buttons

                  Button PropertiesCoordinatesScript/Script Step
                    Type:
                  • Text: Show Images
                  • Top: 4 pt
                  • Left: 9 pt
                  • Bottom: 30 pt
                  • Right: 127 pt
                  • Anchoring: Left, Top
                  Perform Script [ “Show Images” ]

                  Scripts:


                  Button PropertiesCoordinatesScript/Script Step
                    Type:
                  • Text: Download Images
                  • Top: 3 pt
                  • Left: 136 pt
                  • Bottom: 29 pt
                  • Right: 254 pt
                  • Anchoring: Left, Top
                  Perform Script [ “Download Images” ]

                  Scripts:


                  Portals

                  Portal PropertiesCoordinatesFieldsOptions
                  • Top: 41 pt
                  • Left: 532 pt
                  • Bottom: 848 pt
                  • Right: 874 pt
                  • Anchoring: Right, Top and Bottom
                  Field Objects
                  • Sort records: Off
                  • Filter calculation: None
                  • Initial Row: 1
                  • Number of Rows: 5
                  • Show vertical scroll bar

                  Web Viewer Controls

                  Web Viewer Control PropertiesCoordinatesWeb Address
                    Object Name:
                  • web
                    Additional Properties:
                  • Allow interaction with web viewer content
                  • Display progress bar
                  • Display status messages
                  • Automatically encode URL
                  • Top: 40 pt
                  • Left: 10 pt
                  • Bottom: 849 pt
                  • Right: 516 pt
                  • Anchoring: Left and Right, Top and Bottom
                  "http://www.monkeybreadsoftware.de/"

                  Layout Objects: Links

                  Regular Fields

                  Field Name: <Missing Field>
                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                  • Top: 18 pt
                  • Left: 30 pt
                  • Bottom: 32 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

                  Layout Objects: Images

                  Regular Fields

                  Field Name: Images::URL
                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                  • Top: 114 pt
                  • Left: 138 pt
                  • Bottom: 145 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: Default for Data Type
                  • Go to next field using: Tab key
                  Yes

                  Field Name: Images::Image
                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                  • Top: 149 pt
                  • Left: 138 pt
                  • Bottom: 274 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: Default for Data Type
                  • Go to next field using: Tab key
                  No

                  Script Hierarchy

                  Show Images
                  Download Images
                  Delete all Images

                  Next Script: [Download Images]
                  Script NameShow Images
                  Run script with full access privilegesOff
                  Include In MenuYes
                  Layouts that use this script
                  Scripts that use this script
                    Script Definition
                    Script Steps
                    • Set Variable [ $Count; Value:MBS("WebView.GetImageCount"; "web") ]
                    • Set Variable [ $Index; Value:0 ]
                    • Loop
                    • Exit Loop If [ $Index ≥ $Count ]
                    • Set Variable [ $links; Value:$links & MBS("WebView.GetImage"; "web"; $Index; "src") & " -> " & MBS("WebView.GetImage"; "web"; $Index; "alt") & "¶" ]
                    • Set Variable [ $Index; Value:$Index+1 ]
                    • End Loop
                    • Show Custom Dialog [ Title: "All Images"; Message: $links; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                    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: [Show Images]Next Script: [Delete all Images]
                                  Script NameDownload Images
                                  Run script with full access privilegesOff
                                  Include In MenuYes
                                  Layouts that use this script
                                  Scripts that use this script
                                    Script Definition
                                    Script Steps
                                    • Set Variable [ $Count; Value:MBS("WebView.GetImageCount"; "web") ]
                                    • Set Variable [ $Index; Value:0 ]
                                    • Set Variable [ $StartID; Value:Start::ID ]
                                    • New Window [ Style: Card; Name: "Images"; Using layout: “Images” (Images); Close: Yes; Minimize: No; Maximize: No; Resize: No; Menu Bar: No; Dim parent window: Yes; Toolbars: No ]
                                    • Go to Layout [ “Images” (Images) ]
                                    • If [ Get(LastError) = 0 ]
                                    • Delete All Records [ No dialog ]
                                    • End If
                                    • Close Window [ Name: "Images"; Current file ]
                                    • Loop
                                    • Exit Loop If [ $Index ≥ $Count ]
                                    • Set Variable [ $URL; Value:MBS("WebView.GetImage"; "web"; $Index; "src") ]
                                    • If [ Length ( $URL ) > 0 ]
                                    • New Window [ Style: Card; Name: "Images"; Using layout: “Images” (Images); Close: Yes; Minimize: No; Maximize: No; Resize: No; Menu Bar: No; Dim parent window: Yes; Toolbars: No ]
                                    • Go to Layout [ “Images” (Images) ]
                                    • Set Variable [ $curl; Value:MBS("CURL.New") ]
                                    • Set Variable [ $r; Value:MBS("CURL.SetOptionURL"; $curl; $URL) ]
                                    • Set Variable [ $r; Value:MBS("CURL.Perform"; $curl) ]
                                    • Set Variable [ $$debugMessages; Value:MBS("CURL.GetDebugMessages"; $curl) ]
                                    • If [ $r = "OK" ]
                                    • Set Variable [ $container; Value:MBS("CURL.GetResultAsContainer"; $curl) ]
                                    • New Record/Request
                                    • Set Field [ Images::StartID; $StartID ]
                                    • Set Field [ Images::URL; $URL ]
                                    • Set Field [ Images::Image; $container ]
                                    • Commit Records/Requests
                                    • End If
                                    • Set Variable [ $result; Value:MBS("CURL.Release"; $curl) ]
                                    • Close Window [ Name: "Images"; Current file ]
                                    • End If
                                    • Set Variable [ $Index; Value:$Index+1 ]
                                    • 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

                                          Previous Script: [Download Images]
                                          Script NameDelete all Images
                                          Run script with full access privilegesOff
                                          Include In MenuYes
                                          Layouts that use this script
                                            Scripts that use this script
                                              Script Definition
                                              Script Steps
                                              • New Window [ Style: Card; Name: "Images"; Using layout: “Images” (Images); Close: Yes; Minimize: No; Maximize: No; Resize: No; Menu Bar: No; Dim parent window: Yes; Toolbars: No ]
                                              • Go to Layout [ “Images” (Images) ]
                                              • If [ Get(LastError) = 0 ]
                                              • Delete All Records [ No dialog ]
                                              • End If
                                              • Close Window [ Name: "Images"; Current file ]
                                              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: WebViewer Images

                                                          Used functions: