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

MBS FileMaker Plugin Example Databases

ProgressBar in Portal

All examples are included with download of MBS FileMaker Plugin.

ProgressBar in Portal.fmp12

Overview
Tables 2
Relationships 1
Layouts 2
Scripts 2
Value Lists 0
Custom Functions 0
Custom Menus 24
File Options
Default custom menu set [Standard FileMaker Menus]
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 On
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
Occurrences in Relationship Graph
ProgressBar in Portal
5 fields defined, 1 record
ProgressBar in Portal
PortalRecords
10 fields defined, 20 records
PortalRecords

Fields

Table Name: ProgressBar in Portal - 5 Fields
Field Name Type Options Comments On Layouts In Relationships In Scripts In Value Lists
PrimaryKey Normal, Text Auto-Enter: Validation:
  • Only during data entry
  • Not empty
  • Unique
  • Strict validation
Storage:
  • Repetitions: 1
  • Indexing: Minimal
  • Automatically create indexes as needed
  • Index Language: Unicode Raw
Unique identifier of each record in this table
        CreationTimestamp Normal, Timestamp Auto-Enter:
        • Creation timestamp
        Validation:
        • Only during data entry
        • Strict data type: 4 digit year
        • Not empty
        • Strict validation
        Storage:
        • Repetitions: 1
        • Indexing: None
        • Automatically create indexes as needed
        • Index Language: German
        Date and time each record was created
                CreatedBy Normal, Text Auto-Enter:
                • Creation account name
                Validation:
                • Only during data entry
                • Not empty
                • Strict validation
                Storage:
                • Repetitions: 1
                • Indexing: None
                • Automatically create indexes as needed
                • Index Language: German
                Account name of the user who created each record
                        ModificationTimestamp Normal, Timestamp Auto-Enter:
                        • Modification timestamp
                        Validation:
                        • Only during data entry
                        • Strict data type: 4 digit year
                        • Not empty
                        • Strict validation
                        Storage:
                        • Repetitions: 1
                        • Indexing: None
                        • Automatically create indexes as needed
                        • Index Language: German
                        Date and time each record was last modified
                                ModifiedBy Normal, Text Auto-Enter:
                                • Modification account name
                                Validation:
                                • Only during data entry
                                • Not empty
                                • Strict validation
                                Storage:
                                • Repetitions: 1
                                • Indexing: None
                                • Automatically create indexes as needed
                                • Index Language: German
                                Account name of the user who last modified each record

                                        Table Name: PortalRecords - 10 Fields
                                        Field Name Type Options Comments On Layouts In Relationships In Scripts In Value Lists
                                        PrimaryKey Normal, Text Auto-Enter: Validation:
                                        • Only during data entry
                                        • Not empty
                                        • Unique
                                        • Strict validation
                                        Storage:
                                        • Repetitions: 1
                                        • Indexing: Minimal
                                        • Automatically create indexes as needed
                                        • Index Language: Unicode Raw
                                        Unique identifier of each record in this table
                                              CreationTimestamp Normal, Timestamp Auto-Enter:
                                              • Creation timestamp
                                              Validation:
                                              • Only during data entry
                                              • Strict data type: 4 digit year
                                              • Not empty
                                              • Strict validation
                                              Storage:
                                              • Repetitions: 1
                                              • Indexing: None
                                              • Automatically create indexes as needed
                                              • Index Language: German
                                              Date and time each record was created
                                                      CreatedBy Normal, Text Auto-Enter:
                                                      • Creation account name
                                                      Validation:
                                                      • Only during data entry
                                                      • Not empty
                                                      • Strict validation
                                                      Storage:
                                                      • Repetitions: 1
                                                      • Indexing: None
                                                      • Automatically create indexes as needed
                                                      • Index Language: German
                                                      Account name of the user who created each record
                                                              ModificationTimestamp Normal, Timestamp Auto-Enter:
                                                              • Modification timestamp
                                                              Validation:
                                                              • Only during data entry
                                                              • Strict data type: 4 digit year
                                                              • Not empty
                                                              • Strict validation
                                                              Storage:
                                                              • Repetitions: 1
                                                              • Indexing: None
                                                              • Automatically create indexes as needed
                                                              • Index Language: German
                                                              Date and time each record was last modified
                                                                      ModifiedBy Normal, Text Auto-Enter:
                                                                      • Modification account name
                                                                      Validation:
                                                                      • Only during data entry
                                                                      • Not empty
                                                                      • Strict validation
                                                                      Storage:
                                                                      • Repetitions: 1
                                                                      • Indexing: None
                                                                      • Automatically create indexes as needed
                                                                      • Index Language: German
                                                                      Account name of the user who last modified each record
                                                                              Description Normal, Text Auto-Enter:
                                                                              • Allow editing
                                                                              Validation:
                                                                              • Only during data entry
                                                                              Storage:
                                                                              • Repetitions: 1
                                                                              • Indexing: None
                                                                              • Automatically create indexes as needed
                                                                              • Index Language: German
                                                                                    Percent Normal, Number Auto-Enter:
                                                                                    • Allow editing
                                                                                    Validation:
                                                                                    • Only during data entry
                                                                                    Storage:
                                                                                    • Repetitions: 1
                                                                                    • Indexing: None
                                                                                    • Automatically create indexes as needed
                                                                                    • Index Language: German
                                                                                        Bar Script Normal, Binary Auto-Enter:
                                                                                        • Allow editing
                                                                                        Validation:
                                                                                        • Only during data entry
                                                                                        Storage:
                                                                                        • Repetitions: 1
                                                                                            Color Normal, Text Auto-Enter:
                                                                                            • Allow editing
                                                                                            Validation:
                                                                                            • Only during data entry
                                                                                            Storage:
                                                                                            • Repetitions: 1
                                                                                            • Indexing: None
                                                                                            • Automatically create indexes as needed
                                                                                            • Index Language: German
                                                                                                Bar Calculated Normal, Binary Auto-Enter: Validation:
                                                                                                • Only during data entry
                                                                                                Storage:
                                                                                                • Repetitions: 1

                                                                                                      Layout Objects: ProgressBar in Portal

                                                                                                      Regular Fields

                                                                                                      Field Name: PortalRecords::Description
                                                                                                      Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                      • Top: 127 pt
                                                                                                      • Left: 23 pt
                                                                                                      • Bottom: 158 pt
                                                                                                      • Right: 259 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: PortalRecords::Percent
                                                                                                      Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                      • Top: 127 pt
                                                                                                      • Left: 263 pt
                                                                                                      • Bottom: 158 pt
                                                                                                      • Right: 349 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: PortalRecords::Bar Script
                                                                                                      Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                      • Top: 127 pt
                                                                                                      • Left: 353 pt
                                                                                                      • Bottom: 158 pt
                                                                                                      • Right: 593 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

                                                                                                      Field Name: PortalRecords::Color
                                                                                                      Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                      • Top: 127 pt
                                                                                                      • Left: 597 pt
                                                                                                      • Bottom: 158 pt
                                                                                                      • Right: 832 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: PortalRecords::Bar Calculated
                                                                                                      Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                      • Top: 127 pt
                                                                                                      • Left: 836 pt
                                                                                                      • Bottom: 158 pt
                                                                                                      • Right: 1071 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

                                                                                                      Portals

                                                                                                      Portal Properties Coordinates Fields Options
                                                                                                      • Top: 122 pt
                                                                                                      • Left: 18 pt
                                                                                                      • Bottom: 709 pt
                                                                                                      • Right: 1082 pt
                                                                                                      • Anchoring: Left, Top
                                                                                                      Field Objects
                                                                                                      • Sort records: Off
                                                                                                      • Filter calculation: None
                                                                                                      • Initial Row: 1
                                                                                                      • Number of Rows: 15
                                                                                                      • Show vertical scroll bar

                                                                                                      Layout Objects: PortalRecords

                                                                                                      Regular Fields

                                                                                                      Field Name: PortalRecords::Description
                                                                                                      Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                      • Top: 114 pt
                                                                                                      • Left: 6 pt
                                                                                                      • Bottom: 145 pt
                                                                                                      • Right: 294 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: PortalRecords::Percent
                                                                                                      Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                      • Top: 114 pt
                                                                                                      • Left: 299 pt
                                                                                                      • Bottom: 145 pt
                                                                                                      • Right: 378 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: PortalRecords::Bar Script
                                                                                                      Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                      • Top: 114 pt
                                                                                                      • Left: 384 pt
                                                                                                      • Bottom: 145 pt
                                                                                                      • Right: 624 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

                                                                                                      Field Name: PortalRecords::Color
                                                                                                      Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                      • Top: 114 pt
                                                                                                      • Left: 630 pt
                                                                                                      • Bottom: 145 pt
                                                                                                      • Right: 777 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: PortalRecords::Bar Calculated
                                                                                                      Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                      • Top: 114 pt
                                                                                                      • Left: 783 pt
                                                                                                      • Bottom: 145 pt
                                                                                                      • Right: 1023 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

                                                                                                      Create Progress Bar
                                                                                                      Load Layout

                                                                                                      Next Script: [Load Layout]
                                                                                                      Script Name Create Progress Bar
                                                                                                      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
                                                                                                          • #Creates an image, sets settings for the line, paints it with a special size in the environment and writes the image into the container
                                                                                                          • #create environment
                                                                                                          • Set Variable [ $img; Value:MBS( "GMImage.New"; "300x30"; "RGB 1 1 1") ]
                                                                                                          • Set Variable [ $color; Value:PortalRecords::Color ]
                                                                                                          • If [ $color = "auto" ]
                                                                                                          • #color based on percent
                                                                                                          • Set Variable [ $red; Value:65535 * (1 - PortalRecords::Percent / 100) ]
                                                                                                          • Set Variable [ $green; Value:0 ]
                                                                                                          • Set Variable [ $blue; Value:65535 * PortalRecords::Percent / 100 ]
                                                                                                          • Set Variable [ $color; Value:"COLOR " & Round ( $red; 0 ) & " " & Round ( $green; 0 ) & " " & Round ( $blue; 0 ) ]
                                                                                                          • End If
                                                                                                          • #Define the settings for the line
                                                                                                          • Set Variable [ $r; Value:MBS("GMImage.SetStrokeColor"; $img; $color) ]
                                                                                                          • Set Variable [ $actualColor; Value:MBS("GMImage.GetStrokeColor"; $img) // this will give COLOR, even if color was set with RGB or name ]
                                                                                                          • Set Variable [ $actualColorRed; Value:GetAsNumber(MiddleWords ( $actualColor ; 2 ; 1 )) ]
                                                                                                          • Set Variable [ $actualColorGreen; Value:GetAsNumber(MiddleWords ( $actualColor ; 3 ; 1 )) ]
                                                                                                          • Set Variable [ $actualColorBlue; Value:GetAsNumber(MiddleWords ( $actualColor ; 4 ; 1 )) ]
                                                                                                          • Set Variable [ $r; Value:MBS( "GMImage.SetStrokeColor"; $img; "COLOR " & Round($actualColorRed/2 + 32767;0) & " " & Round($actualColorGreen/2 + 32767;0) & " " & Round($actualColorBlue/2 + 32767;0)) ]
                                                                                                          • Set Variable [ $r; Value:MBS( "GMImage.SetLineWidth"; $img; 20) ]
                                                                                                          • Set Variable [ $r; Value:MBS( "GMImage.SetStrokeLineCap"; $img; 2 ) // round cap ]
                                                                                                          • #draw the background
                                                                                                          • Set Variable [ $r; Value:MBS( "GMImage.DrawLine"; $img; 15; 15; 300-15; 15) ]
                                                                                                          • #setup foreground
                                                                                                          • Set Variable [ $r; Value:MBS( "GMImage.SetStrokeColor"; $img; $actualColor) ]
                                                                                                          • Set Variable [ $r; Value:MBS( "GMImage.SetLineWidth"; $img; 20) ]
                                                                                                          • Set Variable [ $r; Value:MBS( "GMImage.SetStrokeLineCap"; $img; 2 ) // round cap ]
                                                                                                          • #draw the smaller part
                                                                                                          • Set Variable [ $r; Value:MBS( "GMImage.DrawLine"; $img; 15; 15; 15 + (300-30) * PortalRecords::Percent/100 ; 15) ]
                                                                                                          • #write image to container
                                                                                                          • Set Variable [ $png; Value:MBS( "GMImage.WriteToPNGContainer"; $img; "bar.png") ]
                                                                                                          • #Release environment
                                                                                                          • Set Variable [ $r; Value:MBS("GMImage.Free"; $img) ]
                                                                                                          • Set Field [ PortalRecords::Bar Script; $png ]
                                                                                                          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: [Create Progress Bar]
                                                                                                                  Script Name Load Layout
                                                                                                                  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
                                                                                                                      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: ProgressBar in Portal

                                                                                                                                    Used functions: