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

MBS FileMaker Plugin Example Databases

ContactsChanged

All examples are included with download of MBS FileMaker Plugin.

ContactsChanged.fmp12

Overview
Tables 1
Relationships 0
Layouts 1
Scripts 4
Value Lists 0
Custom Functions 0
Custom Menus 24
File Options
Default custom menu set [Standard FileMaker Menus]
Default theme Apex Blue
When opening file
Minimum allowed version 12.0
Login using Account Name; Account= Admin
Allow user to save password On
Require iOS passcode Off
Show Sign-in fields On
Switch to layout Off
Hide all toolbars Off
Script triggers
OnFirstWindowOpen Script: Init
OnLastWindowClose Off
OnWindowOpen Off
OnWindowClose Off
OnFileAVPlayerChange Off
OnWindowTransaction Off
Thumbnail Settings
Generate Thumbnails On; Temporary

 

Tables

Table Name
Statistics
Comments
Occurrences in Relationship Graph
ContactsChanged
8 fields defined, 0 record
ContactsChanged

Fields

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

                                                      Layout Objects: ContactsChanged

                                                      Regular Fields

                                                      Field Name: ContactsChanged::What
                                                      Field Properties Coordinates Field Format Field Behavior Quick Find
                                                      • Top: 65 pt
                                                      • Left: 138 pt
                                                      • Bottom: 96 pt
                                                      • Right: 391 pt
                                                      • Anchoring: Left, Top
                                                      Field Format:
                                                      • Edit Box
                                                      Field Behavior:
                                                      • Allow field to be entered: In Find mode, In Browse mode
                                                      • Touch keyboard type: Default for Data Type
                                                      • Go to next field using: Tab key
                                                      Yes

                                                      Field Name: ContactsChanged::ContactID
                                                      Field Properties Coordinates Field Format Field Behavior Quick Find
                                                      • Top: 66 pt
                                                      • Left: 491 pt
                                                      • Bottom: 97 pt
                                                      • Right: 985 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: ContactsChanged::Name
                                                      Field Properties Coordinates Field Format Field Behavior Quick Find
                                                      • Top: 101 pt
                                                      • Left: 138 pt
                                                      • Bottom: 132 pt
                                                      • Right: 391 pt
                                                      • Anchoring: Left, Top
                                                      Field Format:
                                                      • Edit Box
                                                      Field Behavior:
                                                      • Allow field to be entered: In Find mode, In Browse mode
                                                      • Touch keyboard type: Default for Data Type
                                                      • Go to next field using: Tab key
                                                      Yes

                                                      Script Hierarchy

                                                      Init
                                                      Changed
                                                      Check Authorization Status
                                                      Request Authorization

                                                      Next Script: [Changed]
                                                      Script Name Init
                                                      Run script with full access privileges Off
                                                      Siri Shortcut Visible Off
                                                      Include In Menu Yes
                                                      Layouts that use this script
                                                        Scripts that use this script
                                                          Script Definition
                                                          Script Steps
                                                          Fields used in this script
                                                            Scripts used in this script
                                                            Layouts used in this script
                                                              Tables used in this script
                                                                Table occurrences used by this script
                                                                  Custom Functions used by this script
                                                                    Custom menu set used by this script

                                                                      Previous Script: [Init] Next Script: [Check Authorization Status]
                                                                      Script Name Changed
                                                                      Run script with full access privileges Off
                                                                      Siri Shortcut Visible Off
                                                                      Include In Menu No
                                                                      Layouts that use this script
                                                                        Scripts that use this script
                                                                          Script Definition
                                                                          Script Steps
                                                                          • Set Variable [ $CurrentContacts; Value:MBS( "CNContactStore.Contacts"; 0) ]
                                                                          • Set Variable [ $SameContacts; Value:MBS("List.FindEquals"; $$contacts; $CurrentContacts) ]
                                                                          • Set Variable [ $AddedContacts; Value:MBS("List.FindUnequals"; $CurrentContacts; $$contacts; 0; 1) ]
                                                                          • Set Variable [ $DeletedContacts; Value:MBS("List.FindUnequals"; $$contacts; $CurrentContacts; 0; 1) ]
                                                                          • Set Variable [ $count; Value:ValueCount($DeletedContacts) ]
                                                                          • Set Variable [ $index; Value:1 ]
                                                                          • If [ $index ≤ $count ]
                                                                          • Loop [ Flush: Always ]
                                                                          • #your script steps here
                                                                          • Set Variable [ $contactID; Value:GetValue($DeletedContacts; $index) ]
                                                                          • New Record/Request
                                                                          • Set Field [ ContactsChanged::What; "Deleted" ]
                                                                          • Set Field [ ContactsChanged::ContactID; $contactID ]
                                                                          • Set Field [ ContactsChanged::Name; MBS( "CNContact.Name"; $contactID) ]
                                                                          • Commit Records/Requests [ No dialog ]
                                                                          • #next
                                                                          • Set Variable [ $index; Value:$index + 1 ]
                                                                          • Exit Loop If [ $index > $count ]
                                                                          • End Loop
                                                                          • End If
                                                                          • Set Variable [ $count; Value:ValueCount($AddedContacts) ]
                                                                          • Set Variable [ $index; Value:1 ]
                                                                          • If [ $index ≤ $count ]
                                                                          • Loop [ Flush: Always ]
                                                                          • #your script steps here
                                                                          • Set Variable [ $contactID; Value:GetValue($AddedContacts; $index) ]
                                                                          • New Record/Request
                                                                          • Set Field [ ContactsChanged::What; "Added" ]
                                                                          • Set Field [ ContactsChanged::ContactID; $contactID ]
                                                                          • Set Field [ ContactsChanged::Name; MBS( "CNContact.Name"; $contactID) ]
                                                                          • Commit Records/Requests [ No dialog ]
                                                                          • #next
                                                                          • Set Variable [ $index; Value:$index + 1 ]
                                                                          • Exit Loop If [ $index > $count ]
                                                                          • End Loop
                                                                          • End If
                                                                          • Set Variable [ $$contacts; Value:$CurrentContacts ]
                                                                          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: [Changed] Next Script: [Request Authorization]
                                                                                  Script Name Check Authorization Status
                                                                                  Run script with full access privileges Off
                                                                                  Siri Shortcut Visible Off
                                                                                  Include In Menu Yes
                                                                                  Layouts that use this script
                                                                                    Scripts that use this script
                                                                                      Script Definition
                                                                                      Script Steps
                                                                                      Fields used in this script
                                                                                        Scripts used in this script
                                                                                          Layouts used in this script
                                                                                            Tables used in this script
                                                                                              Table occurrences used by this script
                                                                                                Custom Functions used by this script
                                                                                                  Custom menu set used by this script

                                                                                                    Previous Script: [Check Authorization Status]
                                                                                                    Script Name Request Authorization
                                                                                                    Run script with full access privileges Off
                                                                                                    Siri Shortcut Visible Off
                                                                                                    Include In Menu Yes
                                                                                                    Layouts that use this script
                                                                                                      Scripts that use this script
                                                                                                      Script Definition
                                                                                                      Script Steps
                                                                                                      • Set Variable [ $r; Value:MBS( "CNContactStore.RequestAccesss" ) ]
                                                                                                      • Pause/Resume Script [ Duration (seconds): 1 ]
                                                                                                      • Set Variable [ $r; Value:MBS( "CNContactStore.AuthorizationError" ) ]
                                                                                                      • If [ Length($r) > 0 ]
                                                                                                      • Show Custom Dialog [ Title: "Error"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                                                                                      • End If
                                                                                                      • Set Variable [ $groups; Value:MBS( "CNContactStore.Groups" ) ]
                                                                                                      • If [ Length ( $groups ) = 0 ]
                                                                                                      • Show Custom Dialog [ Title: "Possible Problem"; Message: "Either you have no groups or you did not code sign the app?"; Default Button: “OK”, Commit: “Yes” ]
                                                                                                      • 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

                                                                                                                    Download example: ContactsChanged

                                                                                                                    Used functions: