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

MBS FileMaker Plugin Example Databases

Contacts Dialogs

All examples are included with download of MBS FileMaker Plugin.

Contacts Dialogs.fmp12

Overview
Tables1
Relationships0
Layouts1
Scripts7
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
PlaceHolder
1 field defined, 1 record
PlaceHolder

Fields

Table Name: PlaceHolder - 1 Fields
Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
ContactIDNormal, TextAuto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Repetitions: 1
  • Indexing: None
  • Automatically create indexes as needed
  • Index Language: English

      Layout Objects: PlaceHolder

      Regular Fields

      Field Name: PlaceHolder::ContactID
      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
      • Top: 175 pt
      • Left: 75 pt
      • Bottom: 196 pt
      • Right: 314 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

      Merge Fields

      Field PropertiesCoordinatesFieldsQuick Find
        Text:
      • Installed Plug-ins
      • Top: 418 pt
      • Left: 6 pt
      • Bottom: 518 pt
      • Right: 314 pt
      • Anchoring: Left and Right, Top
        No

        Buttons

        Button PropertiesCoordinatesScript/Script Step
          Type:
        • Text: Check Status
        • Top: 60 pt
        • Left: 5 pt
        • Bottom: 92 pt
        • Right: 153 pt
        • Anchoring: Left, Top
        Perform Script [ “Check Authorization Status” ]

        Scripts:


        Button PropertiesCoordinatesScript/Script Step
          Type:
        • Text: Request Authorization
        • Top: 60 pt
        • Left: 166 pt
        • Bottom: 92 pt
        • Right: 314 pt
        • Anchoring: Left, Top
        Perform Script [ “Request Authorization” ]

        Scripts:


        Button PropertiesCoordinatesScript/Script Step
          Type:
        • Text: Show My Card
        • Top: 129 pt
        • Left: 5 pt
        • Bottom: 161 pt
        • Right: 153 pt
        • Anchoring: Left, Top
        Perform Script [ “Show Me” ]

        Scripts:


        Button PropertiesCoordinatesScript/Script Step
          Type:
        • Text: Pick Contact
        • Top: 129 pt
        • Left: 166 pt
        • Bottom: 161 pt
        • Right: 314 pt
        • Anchoring: Left, Top
        Perform Script [ “Pick Contact” ]

        Scripts:


        Button PropertiesCoordinatesScript/Script Step
          Type:
        • Text: Show this Contact
        • Top: 210 pt
        • Left: 166 pt
        • Bottom: 242 pt
        • Right: 314 pt
        • Anchoring: Left, Top
        Perform Script [ “Show This” ]

        Scripts:


        Button PropertiesCoordinatesScript/Script Step
          Type:
        • Text: Contacts Count
        • Top: 210 pt
        • Left: 5 pt
        • Bottom: 242 pt
        • Right: 153 pt
        • Anchoring: Left, Top
        Perform Script [ “All Contacts” ]

        Scripts:


        Script Hierarchy

        Check Authorization Status
        Request Authorization
        Show Me
        Show This
        Pick Contact
        Picked
        All Contacts

        Next Script: [Request Authorization]
        Script NameCheck Authorization Status
        Run script with full access privilegesOff
        Include In MenuNo
        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]Next Script: [Show Me]
                        Script NameRequest Authorization
                        Run script with full access privilegesOff
                        Include In MenuNo
                        Layouts that use this script
                        Scripts that use this script
                          Script Definition
                          Script Steps
                          • #ask user for permission?
                          • Set Variable [ $r; Value:MBS( "CNContactStore.RequestAccesss" ) ]
                          • Pause/Resume Script [ Duration (seconds): 1 ]
                          • #did it work?
                          • 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

                                        Previous Script: [Request Authorization]Next Script: [Show This]
                                        Script NameShow Me
                                        Run script with full access privilegesOff
                                        Include In MenuYes
                                        Layouts that use this script
                                        Scripts that use this script
                                          Script Definition
                                          Script Steps
                                          • #get a contact
                                          • If [ MBS("IsIOS") ]
                                          • Set Variable [ $ID; Value:MBS( "CNContactStore.ContactsMatchingName"; "John Appleseed" ) ]
                                          • Else
                                          • Set Variable [ $ID; Value:MBS( "CNContactStore.UnifiedMeContact" ) ]
                                          • End If
                                          • If [ MBS("IsError") ]
                                          • Show Custom Dialog [ Title: "Failed to get my contact ID"; Message: $ID; Default Button: “OK”, Commit: “Yes” ]
                                          • Else
                                          • Set Field [ PlaceHolder::ContactID; $ID ]
                                          • Set Variable [ $r; Value:MBS( "CNContact.Show"; $ID ) ]
                                          • 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: [Show Me]Next Script: [Pick Contact]
                                                  Script NameShow This
                                                  Run script with full access privilegesOff
                                                  Include In MenuYes
                                                  Layouts that use this script
                                                  Scripts that use this script
                                                    Script Definition
                                                    Script Steps
                                                    • #show a contact by ID (iOS only currently)
                                                    • Set Variable [ $r; Value:MBS( "CNContact.Show"; PlaceHolder::ContactID ) ]
                                                    • If [ MBS("IsError") ]
                                                    • Show Custom Dialog [ Title: "Failed to show contact"; Message: $r; 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

                                                            Previous Script: [Show This]Next Script: [Picked]
                                                            Script NamePick Contact
                                                            Run script with full access privilegesOff
                                                            Include In MenuYes
                                                            Layouts that use this script
                                                            Scripts that use this script
                                                              Script Definition
                                                              Script Steps
                                                              • #use picker sheet/popover to selec contact
                                                              • Set Variable [ $r; Value:MBS( "CNContactPicker.SetTrigger"; Get(FileName); "Picked") ]
                                                              • Set Variable [ $r; Value:MBS( "CNContactPicker.Show") ]
                                                              • If [ MBS("IsError") ]
                                                              • Show Custom Dialog [ Title: "Failed to show picker"; Message: $r; 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

                                                                            Previous Script: [Pick Contact]Next Script: [All Contacts]
                                                                            Script NamePicked
                                                                            Run script with full access privilegesOff
                                                                            Include In MenuNo
                                                                            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: [Picked]
                                                                                        Script NameAll Contacts
                                                                                        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 [ $contacts; Value:MBS( "CNContactStore.Contacts") ]
                                                                                          • Show Custom Dialog [ Title: "Contacts"; Message: "You have " & ValueCount ( $contacts ) & " contacts."; 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: Contacts Dialogs

                                                                                                        Used functions: