MBS FileMaker Plugin Example Databases

Swiss QR-Code for invoices ISO 20022

All examples are included with download of MBS FileMaker Plugin.

Swiss QR-Code for invoices ISO 20022.fmp12

Overview
Tables1
Relationships0
Layouts1
Scripts2
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
base_test
13 fields defined, 1 record
base_test

Fields

Table Name: base_test - 13 Fields
Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
IDNormal, NumberAuto-Enter:
  • Allow editing
  • Context table:
    Calculation: <Field Missing>+1
Validation:
  • Only during data entry
Storage:
  • Repetitions: 1
  • Indexing: None
  • Automatically create indexes as needed
  • Index Language: French
          id_stat_maxSummary, NumberSummary Information:
          • Maximum
          • All together
          • Summary field: ID
          Auto-Enter:
          • Allow editing
                  Swiss_QRNormal, BinaryAuto-Enter:
                  • Allow editing
                  Validation:
                  • Only during data entry
                  Storage:
                  • Repetitions: 1
                      Swiss_QR_versionNormal, NumberAuto-Enter:
                      • Allow editing
                      Validation:
                      • Only during data entry
                      Storage:
                      • Repetitions: 1
                      • Indexing: None
                      • Automatically create indexes as needed
                      • Index Language: French
                              Swiss_QR_dataNormal, TextAuto-Enter:
                              • Allow editing
                              Validation:
                              • Only during data entry
                              Storage:
                              • Repetitions: 1
                              • Indexing: None
                              • Automatically create indexes as needed
                              • Index Language: French
                                      text_2Normal, TextAuto-Enter:
                                      • Allow editing
                                      Validation:
                                      • Only during data entry
                                      Storage:
                                      • Repetitions: 1
                                      • Indexing: None
                                      • Automatically create indexes as needed
                                      • Index Language: French
                                              textfile_containerNormal, BinaryAuto-Enter:
                                              • Allow editing
                                              Validation:
                                              • Only during data entry
                                              Storage:
                                              • Repetitions: 1
                                                      QR_code_jsNormal, TextAuto-Enter:
                                                      • Allow editing
                                                      Validation:
                                                      • Only during data entry
                                                      Storage:
                                                      • Global
                                                      • Repetitions: 1
                                                      • Index Language: French
                                                              QR_code_containerNormal, BinaryAuto-Enter:
                                                              • Allow editing
                                                              Validation:
                                                              • Only during data entry
                                                              Storage:
                                                              • Repetitions: 1
                                                                      QR_code_sizeNormal, NumberAuto-Enter:
                                                                      • Allow editing
                                                                      Validation:
                                                                      • Only during data entry
                                                                      Storage:
                                                                      • Repetitions: 1
                                                                      • Indexing: None
                                                                      • Automatically create indexes as needed
                                                                      • Index Language: French
                                                                              QR_code_index_htmlNormal, TextAuto-Enter:
                                                                              • Allow editing
                                                                              Validation:
                                                                              • Only during data entry
                                                                              Storage:
                                                                              • Global
                                                                              • Repetitions: 1
                                                                              • Index Language: French
                                                                                      QR_code_filenameCalculated, NumberCalculation: Storage:
                                                                                      • Repetitions: 1
                                                                                      • Indexing: None
                                                                                      • Automatically create indexes as needed
                                                                                      • Index Language: French
                                                                                              CrossNormal, BinaryAuto-Enter:
                                                                                              • Allow editing
                                                                                              Validation:
                                                                                              • Only during data entry
                                                                                              Storage:
                                                                                              • Repetitions: 1

                                                                                                  Layout Objects: generate_Swiss_QR

                                                                                                  Regular Fields

                                                                                                  Field Name: base_test::Swiss_QR
                                                                                                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                                                  • Top: 108 pt
                                                                                                  • Left: 7 pt
                                                                                                  • Bottom: 561 pt
                                                                                                  • Right: 487 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
                                                                                                  No

                                                                                                  Field Name: base_test::Cross
                                                                                                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                                                  • Top: 79 pt
                                                                                                  • Left: 597 pt
                                                                                                  • Bottom: 204 pt
                                                                                                  • Right: 850 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
                                                                                                  No

                                                                                                  Buttons

                                                                                                  Button PropertiesCoordinatesScript/Script Step
                                                                                                    Type:
                                                                                                  • Text: generate Swiss QR Code
                                                                                                    Additional Properties:
                                                                                                  • Change to hand cursor over button
                                                                                                  • Top: 79 pt
                                                                                                  • Left: 213 pt
                                                                                                  • Bottom: 101 pt
                                                                                                  • Right: 413 pt
                                                                                                  • Anchoring: Left, Top
                                                                                                  Perform Script [ “generate_SWISS_QR_CODE” ]

                                                                                                  Scripts:


                                                                                                  Script Hierarchy

                                                                                                  generate_SWISS_QR_CODE
                                                                                                  Clear

                                                                                                  Next Script: [Clear]
                                                                                                  Script Namegenerate_SWISS_QR_CODE
                                                                                                  Run script with full access privilegesOff
                                                                                                  Include In MenuYes
                                                                                                  Layouts that use this script
                                                                                                  Scripts that use this script
                                                                                                    Script Definition
                                                                                                    Script Steps
                                                                                                    • ###### SWISS QR CODE GENERATION !
                                                                                                    • #Sample data for QR-Code. May need adjustment to final standard
                                                                                                    • Set Variable [ $text; Value:"SPC" & ¶ & "0100" & ¶ & "1" & ¶ & "CH1234567890123456789" & ¶ & "Hans Müller" & ¶ & "Bahnhofstraße" & ¶ & "123" & ¶ & "1234" & ¶ & "Dorf am See" & ¶ & "CH" & ¶ & "Hans Müller" & ¶ & "Bahnhofstraße" & ¶ & "123" & ¶ & "1234" & ¶ & "Dorf am See" & ¶ & "CH" & ¶ & "1234.56" & ¶ & "CHF" & ¶ & "2018-12-27" & ¶ & "Lisa Müller" & ¶ & "Dorfstraße" & ¶ & "12" & ¶ & "5678" & ¶ & "Dorf am Berg" & ¶ & "CH" & ¶ & "QRR" & ¶ & "000000000000000000000001234" & ¶ & "ligne 28" ]
                                                                                                    • #Barcode options. We use high level as we draw over barcode.
                                                                                                    • Set Variable [ $o; Value:MBS("Barcode.SetOptions"; 4) // ECC Level with values from 1 = low, 2 = middle, 3 = better, 4 high. ]
                                                                                                    • #CRLF line endings needed
                                                                                                    • Set Variable [ $text; Value:MBS( "Text.ReplaceNewline"; $text; 3 ) ]
                                                                                                    • #We render barcode at 4x size for better drawing later
                                                                                                    • Set Variable [ $img; Value:MBS("Barcode.Generate";"QRCODE"; $text; 0; 0; 0; 4; 0; 1; "UTF-8") ]
                                                                                                    • If [ MBS("IsError") = 0 ]
                                                                                                    • Set Variable [ $r; Value:MBS( "GMImage.SetType"; $img; 6) ]
                                                                                                    • #Load cross image
                                                                                                    • Set Variable [ $cross; Value:MBS( "GMImage.NewFromContainer"; base_test::Cross) ]
                                                                                                    • #Scale to match size of barcode proportional
                                                                                                    • Set Variable [ $w; Value:MBS( "GMImage.GetWidth"; $img) ]
                                                                                                    • Set Variable [ $k; Value:Round($w / 6,5; 0) // 20 point to 130 point is factor 6.5 ]
                                                                                                    • Set Variable [ $r; Value:MBS( "GMImage.Scale"; $cross; $k & "x" & $k) ]
                                                                                                    • #Draw cross over barcode
                                                                                                    • Set Variable [ $r; Value:MBS( "GMImage.Composite"; $img; $cross; "CenterGravity"; 1) ]
                                                                                                    • #Save to field
                                                                                                    • Set Field [ base_test::Swiss_QR; MBS( "GMImage.WriteToPNGContainer"; $img; "barcode.png" ) ]
                                                                                                    • #Output with around 4.5cm side length so Swiss cross is 7mm big, (130 point in PDF and 20 point for cross)
                                                                                                    • #Clean up
                                                                                                    • Set Variable [ $r; Value:MBS( "GMImage.Destroy"; $cross) ]
                                                                                                    • Set Variable [ $r; Value:MBS( "GMImage.Destroy"; $img) ]
                                                                                                    • 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: [generate_SWISS_QR_CODE]
                                                                                                            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 [ base_test::Swiss_QR; "" ]
                                                                                                                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

                                                                                                                        Custom Menu Sets

                                                                                                                        Menu SetsMenusIn ScriptsIn LayoutsComments
                                                                                                                        [Standard FileMaker Menus]
                                                                                                                        • All Standard Menus

                                                                                                                        Download example: Swiss QR-Code for invoices ISO 20022

                                                                                                                        Used functions:




                                                                                                                        Links
                                                                                                                        MBS FileMaker blog