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

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
11 fields defined, 1 record
VAT WebService Example

Fields

Table Name: VAT WebService Example - 11 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
                                          CURLOutputNormal, 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: 25 pt
                                              • Left: 138 pt
                                              • Bottom: 44 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: VAT WebService Example::InputVatNumber
                                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                              • Top: 48 pt
                                              • Left: 138 pt
                                              • Bottom: 67 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: VAT WebService Example::OutputCountryCode
                                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                              • Top: 113 pt
                                              • Left: 139 pt
                                              • Bottom: 132 pt
                                              • Right: 392 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: VAT WebService Example::OutputVatNumber
                                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                              • Top: 136 pt
                                              • Left: 139 pt
                                              • Bottom: 155 pt
                                              • Right: 392 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: VAT WebService Example::OutputValid
                                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                              • Top: 159 pt
                                              • Left: 139 pt
                                              • Bottom: 178 pt
                                              • Right: 392 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: VAT WebService Example::OutputName
                                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                              • Top: 182 pt
                                              • Left: 139 pt
                                              • Bottom: 201 pt
                                              • Right: 392 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: VAT WebService Example::OutputAddress
                                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                              • Top: 205 pt
                                              • Left: 139 pt
                                              • Bottom: 224 pt
                                              • Right: 392 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: VAT WebService Example::OutputRequestDate
                                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                              • Top: 228 pt
                                              • Left: 139 pt
                                              • Bottom: 247 pt
                                              • Right: 392 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: VAT WebService Example::CURLResult
                                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                              • Top: 251 pt
                                              • Left: 139 pt
                                              • Bottom: 270 pt
                                              • Right: 392 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: VAT WebService Example::CURLDebugMessages
                                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                              • Top: 274 pt
                                              • Left: 139 pt
                                              • Bottom: 369 pt
                                              • Right: 392 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: VAT WebService Example::CURLOutput
                                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                              • Top: 374 pt
                                              • Left: 138 pt
                                              • Bottom: 454 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

                                              Buttons

                                              Button PropertiesCoordinatesScript/Script Step
                                                Type:
                                              • Text: Check VAT ID
                                              • Top: 74 pt
                                              • Left: 264 pt
                                              • Bottom: 106 pt
                                              • Right: 389 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.GetDebugMessages"; $curl; "UTF8") ]
                                                • Set Variable [ $result; Value:MBS("CURL.GetResultAsText"; $curl; "UTF8") ]
                                                • Set Variable [ $r; Value:MBS("CURL.Cleanup"; $curl) ]
                                                • Set Field [ VAT WebService Example::CURLOutput; $result ]
                                                • #Parse Fields
                                                • Set Field [ VAT WebService Example::OutputCountryCode; MBS("Text.FindBetween"; $result; "<ns2:countryCode>"; "</ns2:countryCode>") ]
                                                • Set Field [ VAT WebService Example::OutputVatNumber; MBS("Text.FindBetween"; $result; "<ns2:vatNumber>"; "</ns2:vatNumber>") ]
                                                • Set Field [ VAT WebService Example::OutputRequestDate; MBS("Text.FindBetween"; $result; "<ns2:requestDate>"; "</ns2:requestDate>") ]
                                                • Set Field [ VAT WebService Example::OutputValid; MBS("Text.FindBetween"; $result; "<ns2:valid>"; "</ns2:valid>") ]
                                                • Set Field [ VAT WebService Example::OutputAddress; MBS("Text.FindBetween"; $result; "<ns2:address>"; "</ns2:address>") ]
                                                • Set Field [ VAT WebService Example::OutputName; MBS("Text.FindBetween"; $result; "<ns2:name>"; "</ns2: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; "" ]
                                                            • Set Field [ VAT WebService Example::CURLOutput; "" ]
                                                            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: