MBS FileMaker Plugin Example Databases

Paypal Create-Invoice-Demo

All examples are included with download of MBS FileMaker Plugin.

Paypal Create-Invoice-Demo.fmp12

Overview
Tables1
Relationships0
Layouts1
Scripts1
Value Lists0
Custom Functions0
Custom Menus32
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
Paypal Login
5 fields defined, 1 record
Paypal Login

Fields

Table Name: Paypal Login - 5 Fields
Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
LoginNameNormal, TextAuto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Repetitions: 1
  • Indexing: None
  • Automatically create indexes as needed
  • Index Language: German
        LoginPasswordNormal, TextAuto-Enter:
        • Allow editing
        Validation:
        • Only during data entry
        Storage:
        • Repetitions: 1
        • Indexing: None
        • Automatically create indexes as needed
        • Index Language: German
              EmailNormal, TextAuto-Enter:
              • Allow editing
              Validation:
              • Only during data entry
              Storage:
              • Repetitions: 1
              • Indexing: None
              • Automatically create indexes as needed
              • Index Language: German
                  QuantityNormal, NumberAuto-Enter:
                  • Allow editing
                  Validation:
                  • Only during data entry
                  Storage:
                  • Repetitions: 1
                  • Indexing: None
                  • Automatically create indexes as needed
                  • Index Language: German
                        AmountNormal, NumberAuto-Enter:
                        • Allow editing
                        Validation:
                        • Only during data entry
                        Storage:
                        • Repetitions: 1
                        • Indexing: None
                        • Automatically create indexes as needed
                        • Index Language: German

                              Layout Objects: Paypal Login

                              Regular Fields

                              Field Name: Paypal Login::LoginName
                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                              • Top: 24 pt
                              • Left: 135 pt
                              • Bottom: 38 pt
                              • Right: 388 pt
                              • Anchoring: Left, Top
                              Field Format:
                              • Edit Box
                              Field Behavior:
                              • Allow field to be entered: In Find mode, In Browse mode
                              • Touch keyboard type: System Default
                              • Go to next field using: Tab key
                              Yes

                              Field Name: Paypal Login::LoginPassword
                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                              • Top: 42 pt
                              • Left: 135 pt
                              • Bottom: 56 pt
                              • Right: 388 pt
                              • Anchoring: Left, Top
                              Field Format:
                              • Edit Box
                              Field Behavior:
                              • Allow field to be entered: In Find mode, In Browse mode
                              • Touch keyboard type: System Default
                              • Go to next field using: Tab key
                              Yes

                              Field Name: Paypal Login::Email
                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                              • Top: 274 pt
                              • Left: 844 pt
                              • Bottom: 300 pt
                              • Right: 1032 pt
                              • Anchoring: Left, Top
                              Field Format:
                              • Edit Box
                              Field Behavior:
                              • Allow field to be entered: In Find mode, In Browse mode
                              • Touch keyboard type: System Default
                              • Go to next field using: Tab key
                              Yes

                              Field Name: Paypal Login::Quantity
                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                              • Top: 361 pt
                              • Left: 852 pt
                              • Bottom: 386 pt
                              • Right: 931 pt
                              • Anchoring: Left, Top
                              Field Format:
                              • Edit Box
                              Field Behavior:
                              • Allow field to be entered: In Find mode, In Browse mode
                              • Touch keyboard type: System Default
                              • Go to next field using: Tab key
                              Yes

                              Field Name: Paypal Login::Amount
                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                              • Top: 400 pt
                              • Left: 853 pt
                              • Bottom: 425 pt
                              • Right: 932 pt
                              • Anchoring: Left, Top
                              Field Format:
                              • Edit Box
                              Field Behavior:
                              • Allow field to be entered: In Find mode, In Browse mode
                              • Touch keyboard type: System Default
                              • Go to next field using: Tab key
                              Yes

                              Group Buttons

                              Button PropertiesCoordinatesScript/Script Step
                                Type:
                              • Text: Set Login Name
                                Additional Properties:
                              • Change to hand cursor over button
                              • Rectangular
                              • Top: 114 pt
                              • Left: 6 pt
                              • Bottom: 139 pt
                              • Right: 103 pt
                              • Anchoring: Left, Top
                              Show Custom Dialog [ Title: "Login Name set"; Message: MBS( "WebView.SetFormInputValue" ; "web"; "login"; "login_email"; Paypal Login::LoginName ); Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]

                              Fields:


                              Button PropertiesCoordinatesScript/Script Step
                                Type:
                              • Text: Set Login Password
                                Additional Properties:
                              • Change to hand cursor over button
                              • Rectangular
                              • Top: 114 pt
                              • Left: 107 pt
                              • Bottom: 139 pt
                              • Right: 224 pt
                              • Anchoring: Left, Top
                              Show Custom Dialog [ Title: "Login Password set"; Message: MBS( "WebView.SetFormInputValue" ; "web"; "login"; "login_password"; Paypal Login::LoginPassword); Default Button: “OK”, Commit: “Yes” ]

                              Fields:


                              Button PropertiesCoordinatesScript/Script Step
                                Type:
                              • Text: Load ‘manage invoices’ page
                                Additional Properties:
                              • Change to hand cursor over button
                              • Rectangular
                              • Top: 110 pt
                              • Left: 844 pt
                              • Bottom: 136 pt
                              • Right: 1032 pt
                              • Anchoring: Left, Top
                              Set Variable [ $r; Value:MBS( "WebView.LoadURL"; "web" ; "https://www.paypal.com/cgi-bin/webscr?cmd=_manage-invoice" ; 0 ) ]

                              Button PropertiesCoordinatesScript/Script Step
                                Type:
                              • Text: Create New Invoice
                                Additional Properties:
                              • Change to hand cursor over button
                              • Rectangular
                              • Top: 196 pt
                              • Left: 844 pt
                              • Bottom: 222 pt
                              • Right: 1032 pt
                              • Anchoring: Left, Top
                              Show Custom Dialog [ Title: "Invoice Created"; Message: MBS( "WebView.FormSubmit" ; "web" ; "manageinvoiceform" ); Default Button: “OK”, Commit: “Yes” ]

                              Button PropertiesCoordinatesScript/Script Step
                                Type:
                              • Text: Set currency
                                Additional Properties:
                              • Change to hand cursor over button
                              • Rectangular
                              • Top: 425 pt
                              • Left: 953 pt
                              • Bottom: 450 pt
                              • Right: 1032 pt
                              • Anchoring: Left, Top
                              Show Custom Dialog [ Title: "currency set (MXN)"; Message: MBS( "WebView.SetFormInputValue" ; "web" ; "" ; "currencyOption"; "MXN" ); Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]

                              Button PropertiesCoordinatesScript/Script Step
                                Type:
                              • Text: Set notes
                                Additional Properties:
                              • Change to hand cursor over button
                              • Rectangular
                              • Top: 509 pt
                              • Left: 953 pt
                              • Bottom: 534 pt
                              • Right: 1032 pt
                              • Anchoring: Left, Top
                              Show Custom Dialog [ Title: "note set"; Message: MBS( "WebView.SetFormTextAreaValue" ; "web" ; "createInvoice" ; "notes"; "Thank you for your purchase!" ); Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]

                              Button PropertiesCoordinatesScript/Script Step
                                Type:
                              • Text: Set Quantity
                                Additional Properties:
                              • Change to hand cursor over button
                              • Rectangular
                              • Top: 361 pt
                              • Left: 953 pt
                              • Bottom: 386 pt
                              • Right: 1032 pt
                              • Anchoring: Left, Top
                              Show Custom Dialog [ Title: "quantity set"; Message: MBS( "WebView.SetFormInputValue" ; "web" ; "" ; "itemQty"; Paypal Login::Quantity ); Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]

                              Fields:


                              Button PropertiesCoordinatesScript/Script Step
                                Type:
                              • Text: Set email
                                Additional Properties:
                              • Change to hand cursor over button
                              • Rectangular
                              • Top: 304 pt
                              • Left: 953 pt
                              • Bottom: 329 pt
                              • Right: 1032 pt
                              • Anchoring: Left, Top
                              Perform Script [ “set email” ]

                              Scripts:


                              Button PropertiesCoordinatesScript/Script Step
                                Type:
                              • Text: update UI
                                Additional Properties:
                              • Change to hand cursor over button
                              • Rectangular
                              • Top: 467 pt
                              • Left: 953 pt
                              • Bottom: 492 pt
                              • Right: 1032 pt
                              • Anchoring: Left, Top
                              Show Custom Dialog [ Title: "UI updated (check Total)"; Message: MBS( "WebView.RunJavaScript" ; "web"; "var o = document.getElementById('itemPrice_0'); if (document.createEvent) { var evt = document.createEvent('Events'); evt.initEvent('change', true, true); o.dispatchEvent(evt); }"); Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]

                              Button PropertiesCoordinatesScript/Script Step
                                Type:
                              • Text: Set Amount
                                Additional Properties:
                              • Change to hand cursor over button
                              • Rectangular
                              • Top: 393 pt
                              • Left: 953 pt
                              • Bottom: 418 pt
                              • Right: 1032 pt
                              • Anchoring: Left, Top
                              Show Custom Dialog [ Title: "amount set"; Message: MBS( "WebView.SetFormInputValue" ; "web" ; "" ; "itemPrice_0"; Paypal Login::Amount ); Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]

                              Fields:


                              Button PropertiesCoordinatesScript/Script Step
                                Type:
                              • Text: Submit
                                Additional Properties:
                              • Change to hand cursor over button
                              • Rectangular
                              • Top: 114 pt
                              • Left: 376 pt
                              • Bottom: 139 pt
                              • Right: 488 pt
                              • Anchoring: Left, Top
                              Show Custom Dialog [ Title: "Submitted"; Message: MBS( "WebView.RunJavaScript" ; "web"; "var o = document.forms[0].btnLogin; if (document.createEvent) { var evt = document.createEvent('Events'); evt.initEvent('click', true, true); o.dispatchEvent(evt); }"); Default Button: “OK”, Commit: “Yes” ]

                              Button PropertiesCoordinatesScript/Script Step
                                Type:
                              • Text: Preview
                                Additional Properties:
                              • Change to hand cursor over button
                              • Rectangular
                              • Top: 572 pt
                              • Left: 851 pt
                              • Bottom: 597 pt
                              • Right: 1026 pt
                              • Anchoring: Left, Top
                              Show Custom Dialog [ Title: "'preview' selected"; Message: MBS( "WebView.RunJavaScript" ; "web"; "var o = document.getElementById('previewInvoice'); if (document.createEvent) { var evt = document.createEvent('Events'); evt.initEvent('click', true, true); o.dispatchEvent(evt); }"); Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]

                              Button PropertiesCoordinatesScript/Script Step
                                Type:
                              • Text: Send Invoice
                                Additional Properties:
                              • Change to hand cursor over button
                              • Rectangular
                              • Top: 607 pt
                              • Left: 851 pt
                              • Bottom: 632 pt
                              • Right: 1026 pt
                              • Anchoring: Left, Top
                              Show Custom Dialog [ Title: "'send invoice' selected"; Message: MBS( "WebView.RunJavaScript" ; "web"; "var o = document.getElementById('sendInvoice'); if (document.createEvent) { var evt = document.createEvent('Events'); evt.initEvent('click', true, true); o.dispatchEvent(evt); }"); Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]

                              Web Viewer Controls

                              Web Viewer Control PropertiesCoordinatesWeb Address
                                Object Name:
                              • web
                                Additional Properties:
                              • Allow interaction with web viewer content
                              • Display progress bar
                              • Display status messages
                              • Automatically encode URL
                              • Top: 145 pt
                              • Left: 6 pt
                              • Bottom: 638 pt
                              • Right: 818 pt
                              • Anchoring: Left, Top
                              "https://www.paypal.com/signin?country.x=US&locale.x=en_US"

                              Script Hierarchy

                              set email

                              Script Nameset email
                              Run script with full access privilegesOff
                              Include In MenuYes
                              Layouts that use this script
                              Scripts that use this script
                                Script Definition
                                Script Steps
                                • #sets email:
                                • Set Variable [ $r; Value:MBS( "WebView.SetFormInputValue" ; "web"; "createInvoice"; "billtotokenfield"; Paypal Login::Email ) ]
                                • #UI refresh:
                                • Set Variable [ $r; Value:MBS( "WebView.RunJavaScript" ; "web"; "var o = document.getElementById('billtotokenfield'); if (document.createEvent) { var evt = document.createEvent('Events'); evt.initEvent('change', true, true); o.dispatchEvent(evt); }") ]
                                • Show Custom Dialog [ Title: "email set"; Default Button: “OK”, Commit: “Yes”; Button 2: “Cancel”, Commit: “No” ]
                                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: Paypal Create-Invoice-Demo

                                        Used functions:




                                        Links
                                        MBS FileMaker blog