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

MBS FileMaker Plugin Example Databases

Events Create Event

All examples are included with download of MBS FileMaker Plugin.

Events Create Event.fmp12

Overview
Tables1
Relationships0
Layouts1
Scripts4
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
Test
15 fields defined, 1 record
Test

Fields

Table Name: Test - 15 Fields
Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
CalendarNormal, TextAuto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Repetitions: 1
  • Indexing: None
  • Automatically create indexes as needed
  • Index Language: German
      AllDayNormal, NumberAuto-Enter:
      • Allow editing
      Validation:
      • Only during data entry
      Storage:
      • Repetitions: 1
      • Indexing: None
      • Automatically create indexes as needed
      • Index Language: German
          StartDateNormal, TimestampAuto-Enter:
          • Allow editing
          Validation:
          • Only during data entry
          Storage:
          • Repetitions: 1
          • Indexing: None
          • Automatically create indexes as needed
          • Index Language: German
              EndDateNormal, TimestampAuto-Enter:
              • Allow editing
              Validation:
              • Only during data entry
              Storage:
              • Repetitions: 1
              • Indexing: None
              • Automatically create indexes as needed
              • Index Language: German
                  NotesNormal, TextAuto-Enter:
                  • Allow editing
                  Validation:
                  • Only during data entry
                  Storage:
                  • Repetitions: 1
                  • Indexing: None
                  • Automatically create indexes as needed
                  • Index Language: German
                      TimeZoneNormal, TextAuto-Enter:
                      • Allow editing
                      Validation:
                      • Only during data entry
                      Storage:
                      • Repetitions: 1
                      • Indexing: None
                      • Automatically create indexes as needed
                      • Index Language: German
                          TitleNormal, TextAuto-Enter:
                          • Allow editing
                          Validation:
                          • Only during data entry
                          Storage:
                          • Repetitions: 1
                          • Indexing: None
                          • Automatically create indexes as needed
                          • Index Language: German
                              URLNormal, TextAuto-Enter:
                              • Allow editing
                              Validation:
                              • Only during data entry
                              Storage:
                              • Repetitions: 1
                              • Indexing: None
                              • Automatically create indexes as needed
                              • Index Language: German
                                  AlarmSoundNormal, TextAuto-Enter:
                                  • Allow editing
                                  Validation:
                                  • Only during data entry
                                  Storage:
                                  • Repetitions: 1
                                  • Indexing: None
                                  • Automatically create indexes as needed
                                  • Index Language: German
                                      AlarmProximityNormal, TextAuto-Enter:
                                      • Allow editing
                                      Validation:
                                      • Only during data entry
                                      Storage:
                                      • Repetitions: 1
                                      • Indexing: None
                                      • Automatically create indexes as needed
                                      • Index Language: German
                                          AlarmLocationTitleNormal, TextAuto-Enter:
                                          • Allow editing
                                          Validation:
                                          • Only during data entry
                                          Storage:
                                          • Repetitions: 1
                                          • Indexing: None
                                          • Automatically create indexes as needed
                                          • Index Language: German
                                              AlarmLocationGeoLatNormal, TextAuto-Enter:
                                              • Allow editing
                                              Validation:
                                              • Only during data entry
                                              Storage:
                                              • Repetitions: 1
                                              • Indexing: None
                                              • Automatically create indexes as needed
                                              • Index Language: German
                                                  AlarmLocationGeoLongNormal, TextAuto-Enter:
                                                  • Allow editing
                                                  Validation:
                                                  • Only during data entry
                                                  Storage:
                                                  • Repetitions: 1
                                                  • Indexing: None
                                                  • Automatically create indexes as needed
                                                  • Index Language: German
                                                      LocationNormal, TextAuto-Enter:
                                                      • Allow editing
                                                      Validation:
                                                      • Only during data entry
                                                      Storage:
                                                      • Repetitions: 1
                                                      • Indexing: None
                                                      • Automatically create indexes as needed
                                                      • Index Language: German
                                                          AlarmLocationRadiusNormal, TextAuto-Enter:
                                                          • Allow editing
                                                          Validation:
                                                          • Only during data entry
                                                          Storage:
                                                          • Repetitions: 1
                                                          • Indexing: None
                                                          • Automatically create indexes as needed
                                                          • Index Language: German

                                                              Layout Objects: Test

                                                              Regular Fields

                                                              Field Name: Test::Calendar
                                                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                              • Top: 60 pt
                                                              • Left: 160 pt
                                                              • Bottom: 81 pt
                                                              • Right: 413 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: Test::AllDay
                                                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                              • Top: 83 pt
                                                              • Left: 160 pt
                                                              • Bottom: 104 pt
                                                              • Right: 413 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: Test::StartDate
                                                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                              • Top: 106 pt
                                                              • Left: 160 pt
                                                              • Bottom: 127 pt
                                                              • Right: 401 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: Test::EndDate
                                                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                              • Top: 129 pt
                                                              • Left: 160 pt
                                                              • Bottom: 150 pt
                                                              • Right: 401 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: Test::Notes
                                                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                              • Top: 152 pt
                                                              • Left: 160 pt
                                                              • Bottom: 173 pt
                                                              • Right: 413 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: Test::TimeZone
                                                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                              • Top: 175 pt
                                                              • Left: 160 pt
                                                              • Bottom: 196 pt
                                                              • Right: 413 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: Test::Title
                                                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                              • Top: 198 pt
                                                              • Left: 160 pt
                                                              • Bottom: 219 pt
                                                              • Right: 413 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: Test::URL
                                                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                              • Top: 221 pt
                                                              • Left: 160 pt
                                                              • Bottom: 242 pt
                                                              • Right: 413 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: Test::AlarmSound
                                                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                              • Top: 278 pt
                                                              • Left: 160 pt
                                                              • Bottom: 299 pt
                                                              • Right: 413 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: Test::AlarmProximity
                                                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                              • Top: 301 pt
                                                              • Left: 160 pt
                                                              • Bottom: 322 pt
                                                              • Right: 413 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: Test::AlarmLocationTitle
                                                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                              • Top: 324 pt
                                                              • Left: 160 pt
                                                              • Bottom: 345 pt
                                                              • Right: 413 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: Test::AlarmLocationGeoLat
                                                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                              • Top: 347 pt
                                                              • Left: 160 pt
                                                              • Bottom: 368 pt
                                                              • Right: 413 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: Test::AlarmLocationGeoLong
                                                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                              • Top: 370 pt
                                                              • Left: 160 pt
                                                              • Bottom: 391 pt
                                                              • Right: 413 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: Test::Location
                                                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                              • Top: 244 pt
                                                              • Left: 160 pt
                                                              • Bottom: 265 pt
                                                              • Right: 413 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: Test::AlarmLocationRadius
                                                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                              • Top: 393 pt
                                                              • Left: 160 pt
                                                              • Bottom: 414 pt
                                                              • Right: 413 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: Create Event
                                                              • Top: 496 pt
                                                              • Left: 443 pt
                                                              • Bottom: 522 pt
                                                              • Right: 560 pt
                                                              • Anchoring: Left, Top
                                                              Perform Script [ “Create Event” ]

                                                              Scripts:


                                                              Button PropertiesCoordinatesScript/Script Step
                                                                Type:
                                                              • Text: Authorize
                                                              • Top: 496 pt
                                                              • Left: 310 pt
                                                              • Bottom: 522 pt
                                                              • Right: 427 pt
                                                              • Anchoring: Left, Top
                                                              Perform Script [ “Authorize” ]

                                                              Scripts:


                                                              Button PropertiesCoordinatesScript/Script Step
                                                                Type:
                                                              • Text: Set Dates
                                                              • Top: 497 pt
                                                              • Left: 177 pt
                                                              • Bottom: 523 pt
                                                              • Right: 294 pt
                                                              • Anchoring: Left, Top
                                                              Perform Script [ “SetDates” ]

                                                              Scripts:


                                                              Script Hierarchy

                                                              Create Event
                                                              SetDates
                                                              Authorize
                                                              Create Calendar

                                                              Next Script: [SetDates]
                                                              Script NameCreate Event
                                                              Run script with full access privilegesOff
                                                              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

                                                                        Previous Script: [Create Event]Next Script: [Authorize]
                                                                        Script NameSetDates
                                                                        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 [ $now; Value:Get(CurrentHostTimestamp) ]
                                                                          • Set Field [ Test::StartDate; $now + 10 * 60 ]
                                                                          • Set Field [ Test::EndDate; $now + 30 * 60 ]
                                                                          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: [SetDates]Next Script: [Create Calendar]
                                                                                  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"; "Events") ]
                                                                                    • 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"; "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]
                                                                                                  Script NameCreate Calendar
                                                                                                  Run script with full access privilegesOff
                                                                                                  Include In MenuYes
                                                                                                  Layouts that use this script
                                                                                                    Scripts that use this script
                                                                                                      Script Definition
                                                                                                      Script Steps
                                                                                                      • #We need a source to add the new calendar to. I prefer local, but newer macOS doesn't have it, so we use caldav for iCloud
                                                                                                      • Set Variable [ $source; Value:MBS( "Events.SourceWithType"; "local" ) ]
                                                                                                      • If [ IsEmpty ( $source ) ]
                                                                                                      • Set Variable [ $source; Value:MBS( "Events.SourceWithType"; "caldav" ) ]
                                                                                                      • End If
                                                                                                      • #New calendar for events
                                                                                                      • Set Variable [ $calendar; Value:MBS( "Events.NewCalendar"; "Event" ) ]
                                                                                                      • #configure it
                                                                                                      • Set Variable [ $r; Value:MBS( "Events.Calendar.SetTitle"; $Calendar; "Test" ) ]
                                                                                                      • Set Variable [ $r; Value:MBS( "Events.Calendar.SetColor"; $Calendar; "red" ) ]
                                                                                                      • Set Variable [ $r; Value:MBS( "Events.Calendar.SetSource"; $Calendar; $Source ) ]
                                                                                                      • #save to database
                                                                                                      • Set Variable [ $r; Value:MBS( "Events.SaveCalendar"; $calendar ;1 ) ]
                                                                                                      • #and check what ID we got for later
                                                                                                      • Set Variable [ $id; Value:MBS( "Events.Calendar.CalendarIdentifier"; $Calendar ) ]
                                                                                                      • Show Custom Dialog [ Title: "Saved calendar"; Message: $r & ¶ & $id; Default Button: “OK”, Commit: “Yes” ]
                                                                                                      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 Create Event

                                                                                                                    Used functions: