MBS FileMaker Plugin Example Databases

Tweet on Twitter

All examples are included with download of MBS FileMaker Plugin.

Tweet on Twitter.fmp12

Overview
Tables2
Relationships0
Layouts3
Scripts6
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
Accounts
4 fields defined, 1 record
Accounts
Tweets
5 fields defined, 1 record
Tweets

Fields

Table Name: Accounts - 4 Fields
Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
IdentifierNormal, TextAuto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Repetitions: 1
  • Indexing: None
  • Automatically create indexes as needed
  • Index Language: German
      DescriptionNormal, TextAuto-Enter:
      • Allow editing
      Validation:
      • Only during data entry
      Storage:
      • Repetitions: 1
      • Indexing: None
      • Automatically create indexes as needed
      • Index Language: German
          UsernameNormal, TextAuto-Enter:
          • Allow editing
          Validation:
          • Only during data entry
          Storage:
          • Repetitions: 1
          • Indexing: None
          • Automatically create indexes as needed
          • Index Language: German
              TypeNormal, TextAuto-Enter:
              • Allow editing
              Validation:
              • Only during data entry
              Storage:
              • Repetitions: 1
              • Indexing: None
              • Automatically create indexes as needed
              • Index Language: German

                  Table Name: Tweets - 5 Fields
                  Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
                  MessageNormal, TextAuto-Enter:
                  • Allow editing
                  Validation:
                  • Only during data entry
                  Storage:
                  • Repetitions: 1
                  • Indexing: None
                  • Automatically create indexes as needed
                  • Index Language: German
                      StatusNormal, TextAuto-Enter:
                      • Allow editing
                      Validation:
                      • Only during data entry
                      Storage:
                      • Repetitions: 1
                      • Indexing: None
                      • Automatically create indexes as needed
                      • Index Language: German
                          ResponseNormal, TextAuto-Enter:
                          • Allow editing
                          Validation:
                          • Only during data entry
                          Storage:
                          • Repetitions: 1
                          • Indexing: None
                          • Automatically create indexes as needed
                          • Index Language: German
                              ErrorMessageNormal, TextAuto-Enter:
                              • Allow editing
                              Validation:
                              • Only during data entry
                              Storage:
                              • Repetitions: 1
                              • Indexing: None
                              • Automatically create indexes as needed
                              • Index Language: German
                                  HeadersNormal, TextAuto-Enter:
                                  • Allow editing
                                  Validation:
                                  • Only during data entry
                                  Storage:
                                  • Repetitions: 1
                                  • Indexing: None
                                  • Automatically create indexes as needed
                                  • Index Language: German

                                      Layout Objects: Accounts

                                      Regular Fields

                                      Field Name: Accounts::Identifier
                                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                      • Top: 58 pt
                                      • Left: 77 pt
                                      • Bottom: 79 pt
                                      • Right: 330 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: Accounts::Description
                                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                      • Top: 81 pt
                                      • Left: 77 pt
                                      • Bottom: 102 pt
                                      • Right: 330 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: Accounts::Username
                                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                      • Top: 104 pt
                                      • Left: 77 pt
                                      • Bottom: 125 pt
                                      • Right: 330 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: Accounts::Type
                                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                      • Top: 127 pt
                                      • Left: 77 pt
                                      • Bottom: 148 pt
                                      • Right: 330 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: Have Permissions?
                                      • Top: 9 pt
                                      • Left: 9 pt
                                      • Bottom: 37 pt
                                      • Right: 135 pt
                                      • Anchoring: Left, Top
                                      Perform Script [ “Check Permissions” ]

                                      Scripts:


                                      Button PropertiesCoordinatesScript/Script Step
                                        Type:
                                      • Text: Request Permissions
                                      • Top: 11 pt
                                      • Left: 152 pt
                                      • Bottom: 39 pt
                                      • Right: 299 pt
                                      • Anchoring: Left, Top
                                      Perform Script [ “Request Permissions” ]

                                      Scripts:


                                      Button PropertiesCoordinatesScript/Script Step
                                        Type:
                                      • Text: List Twitter Accounts
                                      • Top: 11 pt
                                      • Left: 316 pt
                                      • Bottom: 39 pt
                                      • Right: 463 pt
                                      • Anchoring: Left, Top
                                      Perform Script [ “List Twitter Accounts” ]

                                      Scripts:


                                      Button PropertiesCoordinatesScript/Script Step
                                        Type:
                                      • Text: Go To Tweet Layout
                                      • Top: 9 pt
                                      • Left: 480 pt
                                      • Bottom: 37 pt
                                      • Right: 627 pt
                                      • Anchoring: Left, Top
                                      Go to Layout [ “Tweets” (Tweets) ]

                                      Layouts:


                                      Layout Objects: Tweets

                                      Regular Fields

                                      Field Name: Tweets::Message
                                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                      • Top: 52 pt
                                      • Left: 138 pt
                                      • Bottom: 73 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: Tweets::Status
                                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                      • Top: 128 pt
                                      • Left: 138 pt
                                      • Bottom: 149 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: Tweets::Response
                                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                      • Top: 151 pt
                                      • Left: 138 pt
                                      • Bottom: 277 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: Tweets::ErrorMessage
                                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                      • Top: 128 pt
                                      • Left: 494 pt
                                      • Bottom: 149 pt
                                      • Right: 747 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: Tweets::Headers
                                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                      • Top: 151 pt
                                      • Left: 494 pt
                                      • Bottom: 277 pt
                                      • Right: 747 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: Tweet Message
                                      • Top: 82 pt
                                      • Left: 274 pt
                                      • Bottom: 110 pt
                                      • Right: 391 pt
                                      • Anchoring: Left, Top
                                      Perform Script [ “Tweet” ]

                                      Scripts:


                                      Script Hierarchy

                                      List Twitter Accounts
                                      Check Permissions
                                      Request Permissions
                                      RequestAccessForAccountTypeCompleted
                                      Tweet
                                      TweetCompleted

                                      Next Script: [Check Permissions]
                                      Script NameList Twitter Accounts
                                      Run script with full access privilegesOff
                                      Include In MenuYes
                                      Layouts that use this script
                                      Scripts that use this script
                                      Script Definition
                                      Script Steps
                                      • Go to Layout [ “Accounts” (Accounts) ]
                                      • Delete All Records [ No dialog ]
                                      • Set Variable [ $list; Value:MBS( "Social.Accounts"; "Twitter" ) ]
                                      • If [ MBS("IsError") ]
                                      • Show Custom Dialog [ Title: "Error finding accounts"; Message: $list; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                      • Else
                                      • Set Variable [ $count; Value:ValueCount ( $list ) ]
                                      • If [ $count > 0 ]
                                      • Set Variable [ $i; Value:1 ]
                                      • Loop
                                      • Set Variable [ $accountIdentifier; Value:GetValue ( $list ; $i ) ]
                                      • New Record/Request
                                      • Set Field [ Accounts::Identifier; MBS( "Social.AccountProperty"; $accountIdentifier; "Identifier" ) ]
                                      • Set Field [ Accounts::Description; MBS( "Social.AccountProperty"; $accountIdentifier; "Description" ) ]
                                      • Set Field [ Accounts::Username; MBS( "Social.AccountProperty"; $accountIdentifier; "username" ) ]
                                      • Set Field [ Accounts::Type; MBS( "Social.AccountProperty"; $accountIdentifier; "accountType" ) ]
                                      • Commit Records/Requests [ No dialog ]
                                      • Set Variable [ $i; Value:$i + 1 ]
                                      • Exit Loop If [ $i >= $count ]
                                      • End Loop
                                      • End If
                                      • 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: [List Twitter Accounts]Next Script: [Request Permissions]
                                            Script NameCheck Permissions
                                            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( "Social.HasAccessForAccountType"; "Twitter" ) ]
                                              • If [ $r = 1 ]
                                              • Show Custom Dialog [ Title: "Permissions"; Message: "We do have permissions for Twitter."; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                              • Else If [ $r = 0 ]
                                              • Show Custom Dialog [ Title: "Permissions"; Message: "We don't have permissions for Twitter."; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                              • Else
                                              • Show Custom Dialog [ Title: "Permissions"; Message: "Failed to check: " & $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: [Check Permissions]Next Script: [RequestAccessForAccountTypeCompleted]
                                                            Script NameRequest Permissions
                                                            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: [Request Permissions]Next Script: [Tweet]
                                                                            Script NameRequestAccessForAccountTypeCompleted
                                                                            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 [ $p; Value:Get(ScriptParameter) ]
                                                                                • Set Variable [ $type; Value:GetValue($p; 1) ]
                                                                                • Set Variable [ $status; Value:GetValue($p; 2) ]
                                                                                • Set Variable [ $error; Value:GetValue($p; 3) ]
                                                                                • If [ $status = "granted" ]
                                                                                • Perform Script [ “List Twitter Accounts” ]
                                                                                • Else
                                                                                • Show Custom Dialog [ Title: "Access denied"; Message: $error; 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: [RequestAccessForAccountTypeCompleted]Next Script: [TweetCompleted]
                                                                                            Script NameTweet
                                                                                            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 [ $accounts; Value:MBS( "Social.Accounts"; "Twitter") ]
                                                                                              • Set Variable [ $accountIdentifier; Value:GetValue($accounts; 1) ]
                                                                                              • If [ $accountIdentifier = "" ]
                                                                                              • Show Custom Dialog [ Message: "No Twitter account allowed?"; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                                                                              • Else
                                                                                              • Set Variable [ $request; Value:MBS( "SocialRequest.New"; "Twitter"; "https://api.twitter.com/1.1/statuses/update.json"; "POST" ) ]
                                                                                              • Set Variable [ $r; Value:MBS( "SocialRequest.AddParameter"; $request; "status"; Tweets::Message ) ]
                                                                                              • Set Variable [ $r; Value:MBS( "SocialRequest.SetAccount"; $request; $accountIdentifier) ]
                                                                                              • Set Variable [ $r; Value:MBS( "SocialRequest.Perform"; $request; Get(FileName); "TweetCompleted" ) ]
                                                                                              • 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: [Tweet]
                                                                                                      Script NameTweetCompleted
                                                                                                      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

                                                                                                                  Download example: Tweet on Twitter

                                                                                                                  Used functions:




                                                                                                                  Links
                                                                                                                  MBS Xojo PDF Plugins