MBS FileMaker Plugin Example Databases

VAT WebService Example

All examples are included with download of MBS FileMaker Plugin.

VAT WebService Example.fmp12

Overview
Tables1
Relationships0
Layouts1
Scripts2
Value Lists0
Custom Functions0
Custom Menus33
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
VAT WebService Example
10 fields defined, 1 record
VAT WebService Example

Fields

Table Name: VAT WebService Example - 10 Fields
Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
InputCountryCodeNormal, TextAuto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Repetitions: 1
  • Indexing: None
  • Automatically create indexes as needed
  • Index Language: German
      InputVatNumberNormal, TextAuto-Enter:
      • Allow editing
      Validation:
      • Only during data entry
      Storage:
      • Repetitions: 1
      • Indexing: None
      • Automatically create indexes as needed
      • Index Language: German
          OutputCountryCodeNormal, TextAuto-Enter:
          • Allow editing
          Validation:
          • Only during data entry
          Storage:
          • Repetitions: 1
          • Indexing: None
          • Automatically create indexes as needed
          • Index Language: German
              OutputVatNumberNormal, TextAuto-Enter:
              • Allow editing
              Validation:
              • Only during data entry
              Storage:
              • Repetitions: 1
              • Indexing: None
              • Automatically create indexes as needed
              • Index Language: German
                  OutputValidNormal, TextAuto-Enter:
                  • Allow editing
                  Validation:
                  • Only during data entry
                  Storage:
                  • Repetitions: 1
                  • Indexing: None
                  • Automatically create indexes as needed
                  • Index Language: German
                      OutputNameNormal, TextAuto-Enter:
                      • Allow editing
                      Validation:
                      • Only during data entry
                      Storage:
                      • Repetitions: 1
                      • Indexing: None
                      • Automatically create indexes as needed
                      • Index Language: German
                          OutputAddressNormal, TextAuto-Enter:
                          • Allow editing
                          Validation:
                          • Only during data entry
                          Storage:
                          • Repetitions: 1
                          • Indexing: None
                          • Automatically create indexes as needed
                          • Index Language: German
                              OutputRequestDateNormal, TextAuto-Enter:
                              • Allow editing
                              Validation:
                              • Only during data entry
                              Storage:
                              • Repetitions: 1
                              • Indexing: None
                              • Automatically create indexes as needed
                              • Index Language: German
                                  CURLResultNormal, TextAuto-Enter:
                                  • Allow editing
                                  Validation:
                                  • Only during data entry
                                  Storage:
                                  • Repetitions: 1
                                  • Indexing: None
                                  • Automatically create indexes as needed
                                  • Index Language: German
                                      CURLDebugMessagesNormal, TextAuto-Enter:
                                      • Allow editing
                                      Validation:
                                      • Only during data entry
                                      Storage:
                                      • Repetitions: 1
                                      • Indexing: None
                                      • Automatically create indexes as needed
                                      • Index Language: German

                                          Layout Objects: VAT WebService Example

                                          Regular Fields

                                          Field Name: VAT WebService Example::InputCountryCode
                                          Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                          • Top: 24 pt
                                          • Left: 138 pt
                                          • Bottom: 38 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: System Default
                                          • Go to next field using: Tab key
                                          Yes

                                          Field Name: VAT WebService Example::InputVatNumber
                                          Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                          • Top: 42 pt
                                          • Left: 138 pt
                                          • Bottom: 56 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: System Default
                                          • Go to next field using: Tab key
                                          Yes

                                          Field Name: VAT WebService Example::OutputCountryCode
                                          Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                          • Top: 102 pt
                                          • Left: 138 pt
                                          • Bottom: 116 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: System Default
                                          • Go to next field using: Tab key
                                          Yes

                                          Field Name: VAT WebService Example::OutputVatNumber
                                          Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                          • Top: 120 pt
                                          • Left: 138 pt
                                          • Bottom: 134 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: System Default
                                          • Go to next field using: Tab key
                                          Yes

                                          Field Name: VAT WebService Example::OutputValid
                                          Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                          • Top: 138 pt
                                          • Left: 138 pt
                                          • Bottom: 152 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: System Default
                                          • Go to next field using: Tab key
                                          Yes

                                          Field Name: VAT WebService Example::OutputName
                                          Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                          • Top: 156 pt
                                          • Left: 138 pt
                                          • Bottom: 170 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: System Default
                                          • Go to next field using: Tab key
                                          Yes

                                          Field Name: VAT WebService Example::OutputAddress
                                          Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                          • Top: 174 pt
                                          • Left: 138 pt
                                          • Bottom: 188 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: System Default
                                          • Go to next field using: Tab key
                                          Yes

                                          Field Name: VAT WebService Example::CURLResult
                                          Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                          • Top: 222 pt
                                          • Left: 138 pt
                                          • Bottom: 236 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: System Default
                                          • Go to next field using: Tab key
                                          Yes

                                          Field Name: VAT WebService Example::CURLDebugMessages
                                          Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                          • Top: 240 pt
                                          • Left: 138 pt
                                          • Bottom: 344 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: System Default
                                          • Go to next field using: Tab key
                                          Yes

                                          Field Name: VAT WebService Example::OutputRequestDate
                                          Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                          • Top: 192 pt
                                          • Left: 138 pt
                                          • Bottom: 206 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: System Default
                                          • Go to next field using: Tab key
                                          Yes

                                          Group Buttons

                                          Button PropertiesCoordinatesScript/Script Step
                                            Type:
                                          • Text: Check VAT ID
                                            Additional Properties:
                                          • Change to hand cursor over button
                                          • Rectangular
                                          • Top: 66 pt
                                          • Left: 270 pt
                                          • Bottom: 91 pt
                                          • Right: 391 pt
                                          • Anchoring: Left, Top
                                          Perform Script [ “Check” ]

                                          Scripts:


                                          Script Hierarchy

                                          Check
                                          Clear

                                          Next Script: [Clear]
                                          Script NameCheck
                                          Run script with full access privilegesOff
                                          Include In MenuYes
                                          Layouts that use this script
                                          Scripts that use this script
                                            Script Definition
                                            Script Steps
                                            • #Setup transfer
                                            • Set Variable [ $curl; Value:MBS("CURL.New") ]
                                            • Set Variable [ $result; Value:MBS("CURL.SetOptionURL"; $curl; "http://ec.europa.eu/taxation_customs/vies/services/checkVatService") ]
                                            • Set Variable [ $result; Value:MBS("CURL.SetOptionHTTPHeader"; $curl; "Content-Type: text/xml; charset=utf-8"; "Expect:") ]
                                            • #Set input XML with zip code inside
                                            • Set Variable [ $result; Value:MBS("CURL.SetOptionPostFields"; $curl; "<?xml version=\"1.0\" encoding=\"UTF-8\"?> <env:Envelope xmlns:env=\"http://schemas.xmlsoap.org/soap/envelope/\"> <env:Body> <checkVat xmlns=\"urn:ec.europa.eu:taxud:vies:services:checkVat:types\"> <countryCode>" & VAT WebService Example::InputCountryCode & "</countryCode> <vatNumber>" & VAT WebService Example::InputVatNumber & "</vatNumber> </checkVat> </env:Body> </env:Envelope>"; "UTF8") ]
                                            • #Run transfer
                                            • Set Field [ VAT WebService Example::CURLResult; MBS("CURL.Perform"; $curl) ]
                                            • #Check result
                                            • Set Field [ VAT WebService Example::CURLDebugMessages; MBS("CURL.GetDebugAsText"; $curl; "UTF8") ]
                                            • Set Variable [ $result; Value:MBS("CURL.GetResultAsText"; $curl; "UTF8") ]
                                            • Set Variable [ $r; Value:MBS("CURL.Cleanup"; $curl) ]
                                            • #Parse Fields
                                            • Set Field [ VAT WebService Example::OutputCountryCode; MBS("String.FindBetween"; $result; "<countryCode>"; "</countryCode>") ]
                                            • Set Field [ VAT WebService Example::OutputVatNumber; MBS("String.FindBetween"; $result; "<vatNumber>"; "</vatNumber>") ]
                                            • Set Field [ VAT WebService Example::OutputRequestDate; MBS("String.FindBetween"; $result; "<requestDate>"; "</requestDate>") ]
                                            • Set Field [ VAT WebService Example::OutputValid; MBS("String.FindBetween"; $result; "<valid>"; "</valid>") ]
                                            • Set Field [ VAT WebService Example::OutputAddress; MBS("String.FindBetween"; $result; "<address>"; "</address>") ]
                                            • Set Field [ VAT WebService Example::OutputName; MBS("String.FindBetween"; $result; "<name>"; "</name>") ]
                                            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]
                                                    Script NameClear
                                                    Run script with full access privilegesOff
                                                    Include In MenuYes
                                                    Layouts that use this script
                                                      Scripts that use this script
                                                        Script Definition
                                                        Script Steps
                                                        • Set Field [ VAT WebService Example::OutputCountryCode; "" ]
                                                        • Set Field [ VAT WebService Example::OutputVatNumber; "" ]
                                                        • Set Field [ VAT WebService Example::OutputValid; "" ]
                                                        • Set Field [ VAT WebService Example::OutputName; "" ]
                                                        • Set Field [ VAT WebService Example::OutputAddress; "" ]
                                                        • Set Field [ VAT WebService Example::OutputRequestDate; "" ]
                                                        • Set Field [ VAT WebService Example::CURLResult; "" ]
                                                        • Set Field [ VAT WebService Example::CURLDebugMessages; "" ]
                                                        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: VAT WebService Example

                                                                Used functions:




                                                                Links
                                                                MBS Xojo Chart Plugins