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

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
Tables2
Relationships0
Layouts3
Scripts7
Value Lists0
Custom Functions0
Custom Menus24
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
Muster QR Zahlteil
7 fields defined, 20 records
Muster QR Zahlteil

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

                                                                                                  Table Name: Muster QR Zahlteil - 7 Fields
                                                                                                  Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
                                                                                                  __IDNormal, NumberAuto-Enter:
                                                                                                  • Serial: Generate: On creation, Next value: 22, Increment: 1
                                                                                                  Validation:
                                                                                                  • Only during data entry
                                                                                                  • Not empty
                                                                                                  • Unique
                                                                                                  • Strict validation
                                                                                                  Storage:
                                                                                                  • Repetitions: 1
                                                                                                  • Indexing: All
                                                                                                  • Index Language: Unicode Raw
                                                                                                  Unique identifier of each record in this table
                                                                                                          ActualTypeNormal, TextAuto-Enter:
                                                                                                          • Allow editing
                                                                                                          Validation:
                                                                                                          • Only during data entry
                                                                                                          Storage:
                                                                                                          • Repetitions: 1
                                                                                                          • Indexing: None
                                                                                                          • Automatically create indexes as needed
                                                                                                          • Index Language: German
                                                                                                              ContainerNormal, BinaryAuto-Enter:
                                                                                                              • Allow editing
                                                                                                              Validation:
                                                                                                              • Only during data entry
                                                                                                              Storage:
                                                                                                              • Repetitions: 1
                                                                                                                  EncodingCalculated, TextCalculation: Storage:
                                                                                                                  • Repetitions: 1
                                                                                                                  • Do not store calculation results
                                                                                                                  • Index Language: German
                                                                                                                      ExpectedTypeCalculated, TextCalculation: Storage:
                                                                                                                      • Repetitions: 1
                                                                                                                      • Do not store calculation results
                                                                                                                      • Index Language: German
                                                                                                                          ResultNormal, TextAuto-Enter:
                                                                                                                          • Allow editing
                                                                                                                          Validation:
                                                                                                                          • Only during data entry
                                                                                                                          Storage:
                                                                                                                          • Repetitions: 1
                                                                                                                          • Indexing: None
                                                                                                                          • Automatically create indexes as needed
                                                                                                                          • Index Language: German
                                                                                                                              zzz_URLNormal, TextAuto-Enter:
                                                                                                                              • Allow editing
                                                                                                                              Validation:
                                                                                                                              • Only during data entry
                                                                                                                              Storage:
                                                                                                                              • Repetitions: 1
                                                                                                                              • Indexing: None
                                                                                                                              • Automatically create indexes as needed
                                                                                                                              • Index Language: German

                                                                                                                                    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:


                                                                                                                                    Button PropertiesCoordinatesScript/Script Step
                                                                                                                                      Type:
                                                                                                                                    • Text: Weiter zu Muster QR Zahlteil
                                                                                                                                    • Top: 7 pt
                                                                                                                                    • Left: 714 pt
                                                                                                                                    • Bottom: 43 pt
                                                                                                                                    • Right: 895 pt
                                                                                                                                    • Anchoring: Right, Top
                                                                                                                                    Go to Layout [ “Muster QR Zahlteil” (Muster QR Zahlteil) ]

                                                                                                                                    Layouts:


                                                                                                                                    Layout Objects: Muster QR Zahlteil

                                                                                                                                    Regular Fields

                                                                                                                                    Field Name: Muster QR Zahlteil::Container
                                                                                                                                    Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                                                                                    • Top: 63 pt
                                                                                                                                    • Left: 8 pt
                                                                                                                                    • Bottom: 519 pt
                                                                                                                                    • Right: 821 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: Muster QR Zahlteil::Result
                                                                                                                                    Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                                                                                    • Top: 537 pt
                                                                                                                                    • Left: 272 pt
                                                                                                                                    • Bottom: 1129 pt
                                                                                                                                    • Right: 1158 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: Muster QR Zahlteil::zzz_URL
                                                                                                                                    Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                                                                                    • Top: 523 pt
                                                                                                                                    • Left: 8 pt
                                                                                                                                    • Bottom: 545 pt
                                                                                                                                    • Right: 245 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: Muster QR Zahlteil::ExpectedType
                                                                                                                                    Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                                                                                    • Top: 314 pt
                                                                                                                                    • Left: 940 pt
                                                                                                                                    • Bottom: 336 pt
                                                                                                                                    • Right: 1019 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: Muster QR Zahlteil::Encoding
                                                                                                                                    Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                                                                                    • Top: 336 pt
                                                                                                                                    • Left: 940 pt
                                                                                                                                    • Bottom: 358 pt
                                                                                                                                    • Right: 1019 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: Muster QR Zahlteil::ActualType
                                                                                                                                    Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                                                                                    • Top: 358 pt
                                                                                                                                    • Left: 940 pt
                                                                                                                                    • Bottom: 380 pt
                                                                                                                                    • Right: 1019 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

                                                                                                                                    Group Buttons

                                                                                                                                    Button PropertiesCoordinatesScript/Script Step
                                                                                                                                      Type:
                                                                                                                                    • Text: www.PaymentStandards.CH/FAQ
                                                                                                                                      Additional Properties:
                                                                                                                                    • Change to hand cursor over button
                                                                                                                                    • Rectangular
                                                                                                                                    • Top: 433 pt
                                                                                                                                    • Left: 1359 pt
                                                                                                                                    • Bottom: 455 pt
                                                                                                                                    • Right: 1596 pt
                                                                                                                                    • Anchoring: Left, Top
                                                                                                                                    Open URL [ "www.PaymentStandards.CH/FAQ" ] [ No dialog ]

                                                                                                                                    Buttons

                                                                                                                                    Button PropertiesCoordinatesScript/Script Step
                                                                                                                                      Type:
                                                                                                                                    • Text: Barcode auslesen
                                                                                                                                    • Top: 422 pt
                                                                                                                                    • Left: 837 pt
                                                                                                                                    • Bottom: 464 pt
                                                                                                                                    • Right: 1074 pt
                                                                                                                                    • Anchoring: Left, Top
                                                                                                                                    Perform Script [ “PLUGIN P 100: Barcode Detect | Barcode auslesen” ]

                                                                                                                                    Scripts:


                                                                                                                                    Script Hierarchy

                                                                                                                                    generate_SWISS_QR_CODE
                                                                                                                                    Clear
                                                                                                                                    PLUGIN P 100: Barcode Detect | Barcode auslesen
                                                                                                                                    MBS-Befehl "Barcode Detect" im Manual | Handbuch nachschlagen
                                                                                                                                    PLUGIN P900: MBS Plugin Register | Registrieren
                                                                                                                                    Load zbar
                                                                                                                                    PLUGIN P 101: Barcode Detect | Barcode auslesen zbar

                                                                                                                                    Next Script: [Clear]
                                                                                                                                    Script Namegenerate_SWISS_QR_CODE
                                                                                                                                    Run script with full access privilegesOff
                                                                                                                                    Siri Shortcut VisibleOff
                                                                                                                                    Include In MenuYes
                                                                                                                                    Layouts that use this script
                                                                                                                                    Scripts that use this script
                                                                                                                                      Script Definition
                                                                                                                                      Script Steps
                                                                                                                                      • ###### SWISS QR CODE GENERATION !
                                                                                                                                      • Go to Layout [ “generate_Swiss_QR” (base_test) ]
                                                                                                                                      • #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"; 2) // 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]Next Script: [PLUGIN P 100: Barcode Detect | Barcode auslesen]
                                                                                                                                            Script NameClear
                                                                                                                                            Run script with full access privilegesOff
                                                                                                                                            Siri Shortcut VisibleOff
                                                                                                                                            Include In MenuYes
                                                                                                                                            Layouts that use this script
                                                                                                                                              Scripts that use this script
                                                                                                                                                Script Definition
                                                                                                                                                Script Steps
                                                                                                                                                • Go to Layout [ “generate_Swiss_QR” (base_test) ]
                                                                                                                                                • Set Field [ base_test::Swiss_QR; "" ]
                                                                                                                                                • Commit Records/Requests [ No dialog ]
                                                                                                                                                • Go to Layout [ “Muster QR Zahlteil” (Muster QR Zahlteil) ]
                                                                                                                                                • Replace Field Contents [ Muster QR Zahlteil::Result; Replace with calculation: "" ] [ No dialog ]
                                                                                                                                                • Replace Field Contents [ Muster QR Zahlteil::ActualType; Replace with calculation: "" ] [ No dialog ]
                                                                                                                                                • Commit Records/Requests [ No dialog ]
                                                                                                                                                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: [Clear]Next Script: [MBS-Befehl "Barcode Detect" im Manual | Handbuch nachschlagen]
                                                                                                                                                      Script NamePLUGIN P 100: Barcode Detect | Barcode auslesen
                                                                                                                                                      Run script with full access privilegesOff
                                                                                                                                                      Siri Shortcut VisibleOff
                                                                                                                                                      Include In MenuYes
                                                                                                                                                      Layouts that use this script
                                                                                                                                                      Scripts that use this script
                                                                                                                                                        Script Definition
                                                                                                                                                        Script Steps
                                                                                                                                                        • #########################################
                                                                                                                                                        • # INTENDED PURPOSE | ZWECK
                                                                                                                                                        • # Barcode der QR-Rechnung auslesen, um den KREDITOR zu erfassen und die ZAHLUNG auszulösen
                                                                                                                                                        • # HISTORY | HISTORIE
                                                                                                                                                        • # Created 23-MAY-2020 by Ralph Nusser | ralph.nusser@d10.gmch
                                                                                                                                                        • # Last modifications | Letzte Änderungen:
                                                                                                                                                        • # COMMENT | BEMERKUNG
                                                                                                                                                        • #
                                                                                                                                                        • Go to Layout [ “Muster QR Zahlteil” (Muster QR Zahlteil) ]
                                                                                                                                                        • #########################################
                                                                                                                                                        • # VARIABLE DECLARATION | VARIABLENDEKLARATION
                                                                                                                                                        • Set Variable [ $result ]
                                                                                                                                                        • #########################################
                                                                                                                                                        • Set Field [ Muster QR Zahlteil::Result; "" ]
                                                                                                                                                        • If [ IsEmpty(Muster QR Zahlteil::Container) ]
                                                                                                                                                        • Show Custom Dialog [ Message: "Image Missing!"; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                                                                                                                                        • Exit Script [ ]
                                                                                                                                                        • End If
                                                                                                                                                        • Set Variable [ $result; Value:MBS("Barcode.Detect"; Muster QR Zahlteil::Container; Muster QR Zahlteil::ExpectedType ; 1 ; 0 ; Muster QR Zahlteil::Encoding) ]
                                                                                                                                                        • If [ MBS("IsError") ]
                                                                                                                                                        • #Crop image to get closer to the part with QRCode
                                                                                                                                                        • Set Variable [ $Image; Value:MBS("GMImage.NewFromContainer"; Muster QR Zahlteil::Container) ]
                                                                                                                                                        • Set Variable [ $width; Value:MBS("GMImage.GetWidth"; $image) ]
                                                                                                                                                        • Set Variable [ $height; Value:MBS("GMImage.GetHeight"; $image) ]
                                                                                                                                                        • Set Variable [ $crop; Value:MBS("GMImage.Crop";$Image; Round($width/3;0) & "x" & $height & "+" & Round($width/4;0) ) ]
                                                                                                                                                        • Set Variable [ $NewImage; Value:MBS("GMImage.WriteToPNGContainer"; $Image) ]
                                                                                                                                                        • // Set Variable [ $r; Value:MBS( "GMImage.WriteToFile"; $image; "/tmp/test.png" ) ]
                                                                                                                                                        • Set Variable [ $r; Value:MBS("GMImage.Release"; $Image) ]
                                                                                                                                                        • Set Variable [ $result; Value:MBS("Barcode.Detect"; $NewImage; Muster QR Zahlteil::ExpectedType ; 1 ; 0 ; Muster QR Zahlteil::Encoding) ]
                                                                                                                                                        • End If
                                                                                                                                                        • #Zeilenenden korrigieren
                                                                                                                                                        • Set Variable [ $result; Value:MBS( "Text.ReplaceNewline"; $result; 1) ]
                                                                                                                                                        • If [ MBS("IsError") ]
                                                                                                                                                        • Set Field [ Muster QR Zahlteil::Result; $result ]
                                                                                                                                                        • Else
                                                                                                                                                        • Set Field [ Muster QR Zahlteil::Result; $result ]
                                                                                                                                                        • Set Variable [ $pos; Value:Position ( $result ; ": "; 1; 1 ) ]
                                                                                                                                                        • Set Field [ Muster QR Zahlteil::Result; Middle($result ; $pos+2; Length($result)) ]
                                                                                                                                                        • Set Field [ Muster QR Zahlteil::ActualType; Left($result ; $pos-1) ]
                                                                                                                                                        • 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: [PLUGIN P 100: Barcode Detect | Barcode auslesen]Next Script: [PLUGIN P900: MBS Plugin Register | Registrieren]
                                                                                                                                                              Script NameMBS-Befehl "Barcode Detect" im Manual | Handbuch nachschlagen
                                                                                                                                                              Run script with full access privilegesOff
                                                                                                                                                              Siri Shortcut VisibleOff
                                                                                                                                                              Include In MenuYes
                                                                                                                                                              Layouts that use this script
                                                                                                                                                                Scripts that use this script
                                                                                                                                                                  Script Definition
                                                                                                                                                                  Script Steps
                                                                                                                                                                  • Open URL [ "https://www.mbsplugins.eu/BarcodeDetect.shtml" ] [ No dialog ]
                                                                                                                                                                  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: [MBS-Befehl "Barcode Detect" im Manual | Handbuch nachschlagen]Next Script: [Load zbar]
                                                                                                                                                                                Script NamePLUGIN P900: MBS Plugin Register | Registrieren
                                                                                                                                                                                Run script with full access privilegesOff
                                                                                                                                                                                Siri Shortcut VisibleOff
                                                                                                                                                                                Include In MenuYes
                                                                                                                                                                                Layouts that use this script
                                                                                                                                                                                  Scripts that use this script
                                                                                                                                                                                    Script Definition
                                                                                                                                                                                    Script Steps
                                                                                                                                                                                    • #########################################
                                                                                                                                                                                    • # INTENDED PURPOSE | ZWECK
                                                                                                                                                                                    • # Prüfen, ob das MBS Plugin schon registriert ist.
                                                                                                                                                                                    • # Wenn nicht, registrieren.
                                                                                                                                                                                    • # HISTORY | HISTORIE
                                                                                                                                                                                    • # Created 23-MAY-2020 by Ralph Nusser | ralph.nusser@d10.gmbh
                                                                                                                                                                                    • # Last modifications | Letzte Änderungen:
                                                                                                                                                                                    • # COMMENT | BEMERKUNG
                                                                                                                                                                                    • #
                                                                                                                                                                                    • #########################################
                                                                                                                                                                                    • # VARIABLE DECLARATION | VARIABLENDEKLARATION
                                                                                                                                                                                    • #########################################
                                                                                                                                                                                    • If [ MBS("IsRegistered") = 1 ]
                                                                                                                                                                                    • #Registered
                                                                                                                                                                                    • Else
                                                                                                                                                                                    • Set Variable [ $$MBSregistered; Value:MBS("Register"; "FIRMENNAME"; "Complete"; "5 seats"; 202112; "LIZENZCODE") ]
                                                                                                                                                                                    • 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: [PLUGIN P900: MBS Plugin Register | Registrieren]Next Script: [PLUGIN P 101: Barcode Detect | Barcode auslesen zbar]
                                                                                                                                                                                                  Script NameLoad zbar
                                                                                                                                                                                                  Run script with full access privilegesOff
                                                                                                                                                                                                  Siri Shortcut VisibleOff
                                                                                                                                                                                                  Include In MenuYes
                                                                                                                                                                                                  Layouts that use this script
                                                                                                                                                                                                    Scripts that use this script
                                                                                                                                                                                                      Script Definition
                                                                                                                                                                                                      Script Steps
                                                                                                                                                                                                      • // Show Custom Dialog [ Title: "Please change path to library."; Message: "You need to download zbar library for macOS, Windows or Linux and put path in script."; Default Button: “OK”, Commit: “Yes” ]
                                                                                                                                                                                                      • // Exit Script [ ]
                                                                                                                                                                                                      • If [ MBS("IsWindows") ]
                                                                                                                                                                                                      • #you may need to download zbar from our Libs folder or get your own
                                                                                                                                                                                                      • #our copy of the library has a dependency, so we load libiconv first
                                                                                                                                                                                                      • Set Variable [ $path; Value:"C:\Users\Christian\Desktop\libiconv.dll" ]
                                                                                                                                                                                                      • Set Variable [ $r; Value:MBS( "Process.LoadLibrary"; $Path ) ]
                                                                                                                                                                                                      • #now we can load zbar dll
                                                                                                                                                                                                      • Set Variable [ $path; Value:"C:\Users\Christian\Desktop\libzbar64-0.dll" ]
                                                                                                                                                                                                      • Else If [ MBS("isMacOS") ]
                                                                                                                                                                                                      • #you may need to download zbar from our Libs folder or get your own
                                                                                                                                                                                                      • Set Variable [ $path; Value:"/Users/cs/Desktop/libzbar.0.dylib" ]
                                                                                                                                                                                                      • Else If [ MBS("isLinux") ]
                                                                                                                                                                                                      • #you may need to install first: sudo apt-get install libzbar0
                                                                                                                                                                                                      • Set Variable [ $path; Value:"/usr/lib/x86_64-linux-gnu/libzbar.so.0" ]
                                                                                                                                                                                                      • Else
                                                                                                                                                                                                      • Show Custom Dialog [ Title: "Unsupported platform"; Message: "No library coded for this platform or no MBS Plugin installed."; Default Button: “OK”, Commit: “Yes” ]
                                                                                                                                                                                                      • Halt Script
                                                                                                                                                                                                      • End If
                                                                                                                                                                                                      • #load zbar
                                                                                                                                                                                                      • Set Variable [ $r; Value:MBS("Barcode.LoadLibrary"; $path) ]
                                                                                                                                                                                                      • If [ MBS("IsError") ]
                                                                                                                                                                                                      • Show Custom Dialog [ Title: "Failed to load library"; Message: $r; Default Button: “OK”, Commit: “Yes” ]
                                                                                                                                                                                                      • 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: [Load zbar]
                                                                                                                                                                                                                    Script NamePLUGIN P 101: Barcode Detect | Barcode auslesen zbar
                                                                                                                                                                                                                    Run script with full access privilegesOff
                                                                                                                                                                                                                    Siri Shortcut VisibleOff
                                                                                                                                                                                                                    Include In MenuYes
                                                                                                                                                                                                                    Layouts that use this script
                                                                                                                                                                                                                      Scripts that use this script
                                                                                                                                                                                                                        Script Definition
                                                                                                                                                                                                                        Script Steps
                                                                                                                                                                                                                        • #########################################
                                                                                                                                                                                                                        • # INTENDED PURPOSE | ZWECK
                                                                                                                                                                                                                        • # Barcode der QR-Rechnung auslesen, um den KREDITOR zu erfassen und die ZAHLUNG auszulösen
                                                                                                                                                                                                                        • # HISTORY | HISTORIE
                                                                                                                                                                                                                        • # Created 23-MAY-2020 by Ralph Nusser | ralph.nusser@d10.gmch
                                                                                                                                                                                                                        • # Last modifications | Letzte Änderungen:
                                                                                                                                                                                                                        • # COMMENT | BEMERKUNG
                                                                                                                                                                                                                        • #
                                                                                                                                                                                                                        • Go to Layout [ “Muster QR Zahlteil” (Muster QR Zahlteil) ]
                                                                                                                                                                                                                        • #########################################
                                                                                                                                                                                                                        • # VARIABLE DECLARATION | VARIABLENDEKLARATION
                                                                                                                                                                                                                        • Set Variable [ $result ]
                                                                                                                                                                                                                        • #########################################
                                                                                                                                                                                                                        • Set Field [ Muster QR Zahlteil::Result; "" ]
                                                                                                                                                                                                                        • If [ IsEmpty(Muster QR Zahlteil::Container) ]
                                                                                                                                                                                                                        • Show Custom Dialog [ Message: "Image Missing!"; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                                                                                                                                                                                                        • Exit Script [ ]
                                                                                                                                                                                                                        • End If
                                                                                                                                                                                                                        • #########################################
                                                                                                                                                                                                                        • #Auwahl ob Scan oder Detect
                                                                                                                                                                                                                        • #########################################
                                                                                                                                                                                                                        • Set Variable [ $result; Value:MBS("Barcode.Scan"; Muster QR Zahlteil::Container; "all" ) ]
                                                                                                                                                                                                                        • If [ MBS("IsError") or Length ( $result ) < 5 ]
                                                                                                                                                                                                                        • #Crop image to get closer to the part with QRCode
                                                                                                                                                                                                                        • Set Variable [ $Image; Value:MBS("GMImage.NewFromContainer"; Muster QR Zahlteil::Container) ]
                                                                                                                                                                                                                        • Set Variable [ $width; Value:MBS("GMImage.GetWidth"; $image) ]
                                                                                                                                                                                                                        • Set Variable [ $height; Value:MBS("GMImage.GetHeight"; $image) ]
                                                                                                                                                                                                                        • Set Variable [ $crop; Value:MBS("GMImage.Crop";$Image; Round($width/3;0) & "x" & $height & "+" & Round($width/4;0) ) ]
                                                                                                                                                                                                                        • Set Variable [ $NewImage; Value:MBS("GMImage.WriteToPNGContainer"; $Image) ]
                                                                                                                                                                                                                        • Set Variable [ $r; Value:MBS( "GMImage.WriteToFile"; $image; "/tmp/test.png" ) ]
                                                                                                                                                                                                                        • Set Variable [ $r; Value:MBS("GMImage.Release"; $Image) ]
                                                                                                                                                                                                                        • #########################################
                                                                                                                                                                                                                        • #Auwahl ob Scan oder Detect
                                                                                                                                                                                                                        • #########################################
                                                                                                                                                                                                                        • Set Variable [ $result; Value:MBS("Barcode.Scan"; Muster QR Zahlteil::Container; "all") ]
                                                                                                                                                                                                                        • If [ MBS("IsError") ]
                                                                                                                                                                                                                        • Show Custom Dialog [ Title: "Barcode nicht gefunden?"; Message: $result; Default Button: “OK”, Commit: “Yes” ]
                                                                                                                                                                                                                        • Exit Script [ ]
                                                                                                                                                                                                                        • End If
                                                                                                                                                                                                                        • End If
                                                                                                                                                                                                                        • If [ Length ( $result ) < 5 ]
                                                                                                                                                                                                                        • Show Custom Dialog [ Title: "Barcode nicht gefunden?"; Message: $result; Default Button: “OK”, Commit: “Yes” ]
                                                                                                                                                                                                                        • Exit Script [ ]
                                                                                                                                                                                                                        • End If
                                                                                                                                                                                                                        • #Zeilenenden korrigieren
                                                                                                                                                                                                                        • Set Variable [ $json; Value:MBS( "JSON.GetArrayItem"; $result; 0 /* first item */; 0) ]
                                                                                                                                                                                                                        • Set Variable [ $result; Value:MBS( "JSON.GetPathItem"; $json; "text"; 1) ]
                                                                                                                                                                                                                        • Set Variable [ $result; Value:MBS( "Text.ReplaceNewline"; $result; 1) ]
                                                                                                                                                                                                                        • If [ MBS("IsError") ]
                                                                                                                                                                                                                        • Set Field [ Muster QR Zahlteil::Result; $result ]
                                                                                                                                                                                                                        • Else
                                                                                                                                                                                                                        • Set Field [ Muster QR Zahlteil::Result; $result ]
                                                                                                                                                                                                                        • Set Variable [ $pos; Value:Position ( $result ; ": "; 1; 1 ) ]
                                                                                                                                                                                                                        • Set Field [ Muster QR Zahlteil::Result; Middle($result ; $pos+2; Length($result)) ]
                                                                                                                                                                                                                        • Set Field [ Muster QR Zahlteil::ActualType; Left($result ; $pos-1) ]
                                                                                                                                                                                                                        • 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

                                                                                                                                                                                                                              Custom Menu Sets

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

                                                                                                                                                                                                                              Download example: Swiss QR-Code for invoices ISO 20022

                                                                                                                                                                                                                              Used functions: