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
Tables2
Relationships1
Layouts2
Scripts2
Value Lists0
Custom Functions0
Custom Menus24
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
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 NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
PrimaryKeyNormal, TextAuto-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
        CreationTimestampNormal, TimestampAuto-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
                CreatedByNormal, TextAuto-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
                        ModificationTimestampNormal, TimestampAuto-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
                                ModifiedByNormal, TextAuto-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 NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
                                        PrimaryKeyNormal, TextAuto-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
                                              CreationTimestampNormal, TimestampAuto-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
                                                      CreatedByNormal, TextAuto-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
                                                              ModificationTimestampNormal, TimestampAuto-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
                                                                      ModifiedByNormal, TextAuto-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
                                                                              DescriptionNormal, TextAuto-Enter:
                                                                              • Allow editing
                                                                              Validation:
                                                                              • Only during data entry
                                                                              Storage:
                                                                              • Repetitions: 1
                                                                              • Indexing: None
                                                                              • Automatically create indexes as needed
                                                                              • Index Language: German
                                                                                    PercentNormal, NumberAuto-Enter:
                                                                                    • Allow editing
                                                                                    Validation:
                                                                                    • Only during data entry
                                                                                    Storage:
                                                                                    • Repetitions: 1
                                                                                    • Indexing: None
                                                                                    • Automatically create indexes as needed
                                                                                    • Index Language: German
                                                                                        Bar ScriptNormal, BinaryAuto-Enter:
                                                                                        • Allow editing
                                                                                        Validation:
                                                                                        • Only during data entry
                                                                                        Storage:
                                                                                        • Repetitions: 1
                                                                                            ColorNormal, TextAuto-Enter:
                                                                                            • Allow editing
                                                                                            Validation:
                                                                                            • Only during data entry
                                                                                            Storage:
                                                                                            • Repetitions: 1
                                                                                            • Indexing: None
                                                                                            • Automatically create indexes as needed
                                                                                            • Index Language: German
                                                                                                Bar CalculatedNormal, BinaryAuto-Enter: Validation:
                                                                                                • Only during data entry
                                                                                                Storage:
                                                                                                • Repetitions: 1

                                                                                                      Layout Objects: ProgressBar in Portal

                                                                                                      Regular Fields

                                                                                                      Field Name: PortalRecords::Description
                                                                                                      Field PropertiesCoordinatesField FormatField BehaviorQuick 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 PropertiesCoordinatesField FormatField BehaviorQuick 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 PropertiesCoordinatesField FormatField BehaviorQuick 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 PropertiesCoordinatesField FormatField BehaviorQuick 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 PropertiesCoordinatesField FormatField BehaviorQuick 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 PropertiesCoordinatesFieldsOptions
                                                                                                      • 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 PropertiesCoordinatesField FormatField BehaviorQuick 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 PropertiesCoordinatesField FormatField BehaviorQuick 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 PropertiesCoordinatesField FormatField BehaviorQuick 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 PropertiesCoordinatesField FormatField BehaviorQuick 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 PropertiesCoordinatesField FormatField BehaviorQuick 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 NameCreate Progress Bar
                                                                                                      Run script with full access privilegesOff
                                                                                                      Siri Shortcut VisibleOff
                                                                                                      Include In MenuYes
                                                                                                      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 NameLoad Layout
                                                                                                                  Run script with full access privilegesOff
                                                                                                                  Siri Shortcut VisibleOff
                                                                                                                  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

                                                                                                                                    Download example: ProgressBar in Portal

                                                                                                                                    Used functions: