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
Tables 2
Relationships 1
Layouts 2
Scripts 3
Value Lists 0
Custom Functions 0
Custom Menus 32
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
Start
1 field defined, 1 record
Start
Images
3 fields defined, 0 record
Images

Fields

Table Name: Start - 1 Fields
Field Name Type Options Comments On Layouts In Relationships In Scripts In Value Lists
ID Normal, Number Auto-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 Name Type Options Comments On Layouts In Relationships In Scripts In Value Lists
      URL Normal, Text Auto-Enter:
      • Allow editing
      Validation:
      • Only during data entry
      Storage:
      • Repetitions: 1
      • Indexing: None
      • Automatically create indexes as needed
      • Index Language: German
          Image Normal, Binary Auto-Enter:
          • Allow editing
          Validation:
          • Only during data entry
          Storage:
          • Repetitions: 1
              StartID Normal, Number Auto-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 Properties Coordinates Field Format Field Behavior Quick 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 Properties Coordinates Field Format Field Behavior Quick 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 Properties Coordinates Script/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 Properties Coordinates Script/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 Properties Coordinates Fields Options
                  • 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 Properties Coordinates Web 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: Images

                  Regular Fields

                  Field Name: Images::URL
                  Field Properties Coordinates Field Format Field Behavior Quick 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 Properties Coordinates Field Format Field Behavior Quick 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 Name Show Images
                  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 Variable [ $Count; Value:MBS("WebView.GetImageCount"; "web") ]
                    • Set Variable [ $Index; Value:0 ]
                    • Loop [ Flush: Always ]
                    • 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 Name Download Images
                                  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 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 [ Flush: Always ]
                                    • 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 Name Delete all Images
                                          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
                                              • 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: