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
Tables 1
Relationships 0
Layouts 1
Scripts 2
Value Lists 0
Custom Functions 0
Custom Menus 33
File Options
Default custom menu set [Standard FileMaker Menus]
Default theme Minimalistisch
When opening file
Minimum allowed version 12.0
Login using Account Name; Account= Admin
Allow user to save password On
Require iOS passcode Off
Show Sign-in fields Off
Switch to layout Off
Hide all toolbars Off
Script triggers
OnFirstWindowOpen Off
OnLastWindowClose Off
OnWindowOpen Off
OnWindowClose Off
OnFileAVPlayerChange Off
OnWindowTransaction Off
Thumbnail Settings
Generate Thumbnails On; Temporary

 

Tables

Table Name
Statistics
Comments
Occurrences in Relationship Graph
VAT WebService Example
11 fields defined, 1 record
VAT WebService Example

Fields

Table Name: VAT WebService Example - 11 Fields
Field Name Type Options Comments On Layouts In Relationships In Scripts In Value Lists
InputCountryCode Normal, Text Auto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Repetitions: 1
  • Indexing: None
  • Automatically create indexes as needed
  • Index Language: German
      InputVatNumber Normal, Text Auto-Enter:
      • Allow editing
      Validation:
      • Only during data entry
      Storage:
      • Repetitions: 1
      • Indexing: None
      • Automatically create indexes as needed
      • Index Language: German
          OutputCountryCode Normal, Text Auto-Enter:
          • Allow editing
          Validation:
          • Only during data entry
          Storage:
          • Repetitions: 1
          • Indexing: None
          • Automatically create indexes as needed
          • Index Language: German
              OutputVatNumber Normal, Text Auto-Enter:
              • Allow editing
              Validation:
              • Only during data entry
              Storage:
              • Repetitions: 1
              • Indexing: None
              • Automatically create indexes as needed
              • Index Language: German
                  OutputValid Normal, Text Auto-Enter:
                  • Allow editing
                  Validation:
                  • Only during data entry
                  Storage:
                  • Repetitions: 1
                  • Indexing: None
                  • Automatically create indexes as needed
                  • Index Language: German
                      OutputName Normal, Text Auto-Enter:
                      • Allow editing
                      Validation:
                      • Only during data entry
                      Storage:
                      • Repetitions: 1
                      • Indexing: None
                      • Automatically create indexes as needed
                      • Index Language: German
                          OutputAddress Normal, Text Auto-Enter:
                          • Allow editing
                          Validation:
                          • Only during data entry
                          Storage:
                          • Repetitions: 1
                          • Indexing: None
                          • Automatically create indexes as needed
                          • Index Language: German
                              OutputRequestDate Normal, Text Auto-Enter:
                              • Allow editing
                              Validation:
                              • Only during data entry
                              Storage:
                              • Repetitions: 1
                              • Indexing: None
                              • Automatically create indexes as needed
                              • Index Language: German
                                  CURLResult Normal, Text Auto-Enter:
                                  • Allow editing
                                  Validation:
                                  • Only during data entry
                                  Storage:
                                  • Repetitions: 1
                                  • Indexing: None
                                  • Automatically create indexes as needed
                                  • Index Language: German
                                      CURLDebugMessages Normal, Text Auto-Enter:
                                      • Allow editing
                                      Validation:
                                      • Only during data entry
                                      Storage:
                                      • Repetitions: 1
                                      • Indexing: None
                                      • Automatically create indexes as needed
                                      • Index Language: German
                                          CURLOutput Normal, Text Auto-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 Properties Coordinates Field Format Field Behavior Quick 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 Properties Coordinates Field Format Field Behavior Quick 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 Properties Coordinates Field Format Field Behavior Quick 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 Properties Coordinates Field Format Field Behavior Quick 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 Properties Coordinates Field Format Field Behavior Quick 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 Properties Coordinates Field Format Field Behavior Quick 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 Properties Coordinates Field Format Field Behavior Quick 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 Properties Coordinates Field Format Field Behavior Quick 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 Properties Coordinates Field Format Field Behavior Quick 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 Properties Coordinates Field Format Field Behavior Quick 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 Properties Coordinates Field Format Field Behavior Quick 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 Properties Coordinates Script/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 Name Check
                                              Run script with full access privileges Off
                                              Siri Shortcut Visible Off
                                              Include In Menu Yes
                                              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 Name Clear
                                                        Run script with full access privileges Off
                                                        Siri Shortcut Visible Off
                                                        Include In Menu Yes
                                                        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: