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

MBS FileMaker Plugin Example Databases

Events Changes

All examples are included with download of MBS FileMaker Plugin.

Events Changes.fmp12

Overview
Tables1
Relationships0
Layouts1
Scripts4
Value Lists0
Custom Functions0
Custom Menus0
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
Events Changes
6 fields defined, 0 record
Events Changes

Fields

Table Name: Events Changes - 6 Fields
Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
TimeStampNormal, TimestampAuto-Enter:
  • Creation timestamp
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Repetitions: 1
  • Indexing: None
  • Automatically create indexes as needed
  • Index Language: German
        CalendarCountNormal, NumberAuto-Enter:
        • Allow editing
        Validation:
        • Only during data entry
        Storage:
        • Repetitions: 1
        • Indexing: None
        • Automatically create indexes as needed
        • Index Language: German
            EventCountNormal, NumberAuto-Enter:
            • Allow editing
            Validation:
            • Only during data entry
            Storage:
            • Repetitions: 1
            • Indexing: None
            • Automatically create indexes as needed
            • Index Language: German
                ReminderCountNormal, NumberAuto-Enter:
                • Allow editing
                Validation:
                • Only during data entry
                Storage:
                • Repetitions: 1
                • Indexing: None
                • Automatically create indexes as needed
                • Index Language: German
                    CommentNormal, TextAuto-Enter:
                    • Allow editing
                    Validation:
                    • Only during data entry
                    Storage:
                    • Repetitions: 1
                    • Indexing: None
                    • Automatically create indexes as needed
                    • Index Language: German
                        ChangesNormal, TextAuto-Enter:
                        • Allow editing
                        Validation:
                        • Only during data entry
                        Storage:
                        • Repetitions: 1
                        • Indexing: None
                        • Automatically create indexes as needed
                        • Index Language: German

                            Layout Objects: Events Changes

                            Regular Fields

                            Field Name: Events Changes::TimeStamp
                            Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                            • Top: 55 pt
                            • Left: 9 pt
                            • Bottom: 76 pt
                            • Right: 250 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: Events Changes::CalendarCount
                            Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                            • Top: 55 pt
                            • Left: 255 pt
                            • Bottom: 76 pt
                            • Right: 334 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: Events Changes::EventCount
                            Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                            • Top: 55 pt
                            • Left: 339 pt
                            • Bottom: 76 pt
                            • Right: 418 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: Events Changes::ReminderCount
                            Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                            • Top: 55 pt
                            • Left: 423 pt
                            • Bottom: 76 pt
                            • Right: 502 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: Events Changes::Comment
                            Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                            • Top: 55 pt
                            • Left: 507 pt
                            • Bottom: 76 pt
                            • Right: 760 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: Events Changes::Changes
                            Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                            • Top: 55 pt
                            • Left: 765 pt
                            • Bottom: 76 pt
                            • Right: 1018 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

                            Buttons

                            Button PropertiesCoordinatesScript/Script Step
                              Type:
                            • Text: Start
                            • Top: 88 pt
                            • Left: 22 pt
                            • Bottom: 116 pt
                            • Right: 163 pt
                            • Anchoring: Left, Top
                            Perform Script [ “Start” ]

                            Scripts:


                            Script Hierarchy

                            Authorize
                            Start
                            Update
                            GotNotification

                            Next Script: [Start]
                            Script NameAuthorize
                            Run script with full access privilegesOff
                            Include In MenuYes
                            Layouts that use this script
                              Scripts that use this script
                              Script Definition
                              Script Steps
                              • Set Variable [ $r; Value:MBS("Events.AuthorizationStatusForEntityType"; "Reminder") ]
                              • If [ MBS("IsError") ]
                              • Show Custom Dialog [ Title: "We have a problem"; Message: MBS("Text.RemovePrefix"; $r; "[MBS] "); Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                              • Else If [ $r = "NotDetermined" ]
                              • Set Variable [ $r; Value:MBS( "Events.requestAccessToEntityType"; "Reminder Events" ) ]
                              • If [ $r = "Wait" ]
                              • #dialog is showing.
                              • Else If [ $r = "OK" ]
                              • Show Custom Dialog [ Title: "Success"; Message: "We are authorized and ready to go."; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                              • Else
                              • Show Custom Dialog [ Title: "We have a problem"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                              • End If
                              • Else If [ $r = "Restricted" ]
                              • Show Custom Dialog [ Title: "Success"; Message: "We are authorized for a restricted access and ready to go."; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                              • Else If [ $r = "Denied" ]
                              • Show Custom Dialog [ Title: "Problem"; Message: "We are denied for calendar access. Please go to system preferences and enable us."; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                              • Else If [ $r = "Authorized" ]
                              • Show Custom Dialog [ Title: "Success"; Message: "We are authorized and ready to go."; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                              • Else
                              • Show Custom Dialog [ Title: "We have a problem"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                              • End If
                              Fields used in this script
                                Scripts used in this script
                                  Layouts used in this script
                                    Tables used in this script
                                      Table occurrences used by this script
                                        Custom Functions used by this script
                                          Custom menu set used by this script

                                            Previous Script: [Authorize]Next Script: [Update]
                                            Script NameStart
                                            Run script with full access privilegesOff
                                            Include In MenuYes
                                            Layouts that use this script
                                            Scripts that use this script
                                              Script Definition
                                              Script Steps
                                              • Perform Script [ “Authorize” ]
                                              • Delete All Records [ No dialog ]
                                              • Perform Script [ “Update”; Parameter: "Start" ]
                                              • Set Variable [ $r; Value:MBS( "Events.SetNotification"; Get(FileName); "GotNotification" ) ]
                                              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: [Start]Next Script: [GotNotification]
                                                          Script NameUpdate
                                                          Run script with full access privilegesOff
                                                          Include In MenuYes
                                                          Layouts that use this script
                                                            Scripts that use this script
                                                            Script Definition
                                                            Script Steps
                                                            • #Query new values
                                                            • Set Variable [ $EventCalendar; Value:MBS( "Events.Calendars"; "events" ) ]
                                                            • Set Variable [ $ReminderCalendar; Value:MBS( "Events.Calendars"; "Reminder" ) ]
                                                            • Set Variable [ $Events; Value:MBS( "Events.Events"; Get(CurrentHostTimestamp) - 365* 86400 ) ]
                                                            • Set Variable [ $Reminders; Value:MBS( "Events.Reminders") ]
                                                            • #Check for differences
                                                            • Set Variable [ $Changes; Value:"" ]
                                                            • If [ not IsEmpty ( $$gEvents ) ]
                                                            • Set Variable [ $diff; Value:MBS("List.FindUnequals"; $$gEvents; $events) ]
                                                            • If [ Length ( $diff ) > 0 ]
                                                            • Set Variable [ $Changes; Value:$Changes & "Events: " & $diff ]
                                                            • End If
                                                            • End If
                                                            • If [ not IsEmpty ( $$gReminders ) ]
                                                            • Set Variable [ $diff; Value:MBS("List.FindUnequals"; $$gReminders; $reminders) ]
                                                            • If [ Length ( $diff ) > 0 ]
                                                            • Set Variable [ $Changes; Value:$Changes & "Reminders: " & $diff ]
                                                            • End If
                                                            • End If
                                                            • If [ not IsEmpty ( $$EventCalendar) ]
                                                            • Set Variable [ $diff; Value:MBS("List.FindUnequals"; $$EventCalendar; $EventCalendar) ]
                                                            • If [ Length ( $diff ) > 0 ]
                                                            • Set Variable [ $Changes; Value:$Changes & "Event Calendars: " & $diff ]
                                                            • End If
                                                            • End If
                                                            • If [ not IsEmpty ( $$ReminderCalendar) ]
                                                            • Set Variable [ $diff; Value:MBS("List.FindUnequals"; $$ReminderCalendar; $ReminderCalendar) ]
                                                            • If [ Length ( $diff ) > 0 ]
                                                            • Set Variable [ $Changes; Value:$Changes & "Reminder Calendars: " & $diff ]
                                                            • End If
                                                            • End If
                                                            • Set Variable [ $$gEvents; Value:$events ]
                                                            • Set Variable [ $$gReminders; Value:$reminders ]
                                                            • Set Variable [ $$ReminderCalendar; Value:$ReminderCalendar ]
                                                            • Set Variable [ $$EventCalendar; Value:$EventCalendar ]
                                                            • #Now save to database
                                                            • New Record/Request
                                                            • Set Field [ Events Changes::CalendarCount; ValueCount ( $EventCalendar ) + ValueCount ( $ReminderCalendar ) ]
                                                            • Set Field [ Events Changes::EventCount; ValueCount ( $events ) ]
                                                            • Set Field [ Events Changes::ReminderCount; ValueCount ( $reminders ) ]
                                                            • Set Field [ Events Changes::Comment; Get(ScriptParameter) ]
                                                            • Set Field [ Events Changes::Changes; $Changes ]
                                                            • Commit Records/Requests [ No dialog ]
                                                            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: [Update]
                                                                    Script NameGotNotification
                                                                    Run script with full access privilegesOff
                                                                    Include In MenuYes
                                                                    Layouts that use this script
                                                                      Scripts that use this script
                                                                        Script Definition
                                                                        Script Steps
                                                                        • Perform Script [ “Update”; Parameter: "Notification" ]
                                                                        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: Events Changes

                                                                                    Used functions: