MBS FileMaker Plugin Example Databases

Solution Registration

All examples are included with download of MBS FileMaker Plugin.

Solution Registration.fmp12

Overview
Tables1
Relationships0
Layouts1
Scripts1
Value Lists0
Custom Functions0
Custom Menus33
File Options
Default custom menu set[Standard FileMaker Menus]
When opening file
Minimum allowed version12.0
Login usingAccount Name; Account= Admin
Allow user to save passwordOff
Require iOS passcodeOff
Switch to layoutOff
Hide all toolbarsOff
Script triggers
OnFirstWindowOpenOff
OnLastWindowCloseOff
OnWindowOpenOff
OnWindowCloseOff
OnFileAVPlayerChangeOff
Thumbnail Settings
Generate ThumbnailsOn; Temporary

 

Tables

Table Name
Statistics
Occurrences in Relationship Graph
Solution Registration
4 fields defined, 1 record
Solution Registration

Fields

Table Name: Solution Registration - 4 Fields
Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
KeyNormal, TextAuto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Repetitions: 1
  • Indexing: None
  • Automatically create indexes as needed
  • Index Language: German
      LicenseeNormal, TextAuto-Enter:
        Validation:
        • Only during data entry
        Storage:
        • Repetitions: 1
        • Indexing: None
        • Automatically create indexes as needed
        • Index Language: German
            EndDateNormal, TimestampAuto-Enter:
              Validation:
              • Only during data entry
              Storage:
              • Repetitions: 1
              • Indexing: None
              • Automatically create indexes as needed
              • Index Language: German
                  LicensedNormal, TextAuto-Enter:
                    Validation:
                    • Only during data entry
                    Storage:
                    • Global
                    • Repetitions: 1
                    • Index Language: German

                        Layout Objects: Solution Registration

                        Regular Fields

                        Field Name: Solution Registration::Key
                        Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                        • Top: 60 pt
                        • Left: 138 pt
                        • Bottom: 236 pt
                        • Right: 529 pt
                        • Anchoring: Left, Top
                        Field Format:
                        • Edit Box
                        Field Behavior:
                        • Allow field to be entered: In Find mode, In Browse mode
                        • Touch keyboard type: System Default
                        • Go to next field using: Tab key
                        Yes

                        Field Name: Solution Registration::Licensee
                        Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                        • Top: 264 pt
                        • Left: 138 pt
                        • Bottom: 278 pt
                        • Right: 391 pt
                        • Anchoring: Left, Top
                        Field Format:
                        • Edit Box
                        Field Behavior:
                        • Allow field to be entered: In Find mode, In Browse mode
                        • Touch keyboard type: System Default
                        • Go to next field using: Tab key
                        Yes

                        Field Name: Solution Registration::EndDate
                        Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                        • Top: 282 pt
                        • Left: 138 pt
                        • Bottom: 296 pt
                        • Right: 379 pt
                        • Anchoring: Left, Top
                        Field Format:
                        • Edit Box
                        Field Behavior:
                        • Allow field to be entered: In Find mode, In Browse mode
                        • Touch keyboard type: System Default
                        • Go to next field using: Tab key
                        Yes

                        Field Name: Solution Registration::Licensed
                        Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                        • Top: 6 pt
                        • Left: 138 pt
                        • Bottom: 20 pt
                        • Right: 391 pt
                        • Anchoring: Left, Top
                        Field Format:
                        • Edit Box
                        Field Behavior:
                        • Allow field to be entered: In Find mode, In Browse mode
                        • Touch keyboard type: System Default
                        • Go to next field using: Tab key
                        No

                        Group Buttons

                        Button PropertiesCoordinatesScript/Script Step
                          Type:
                        • Text: Check Key
                          Additional Properties:
                        • Change to hand cursor over button
                        • Rectangular
                        • Top: 246 pt
                        • Left: 426 pt
                        • Bottom: 277 pt
                        • Right: 547 pt
                        • Anchoring: Left, Top
                        Perform Script [ “Verify” ]

                        Scripts:


                        Script Hierarchy

                        Verify

                        Script NameVerify
                        Run script with full access privilegesOff
                        Include In MenuYes
                        Layouts that use this script
                        Scripts that use this script
                          Script Definition
                          Script Steps
                          • Set Field [ Solution Registration::Licensed; "no" ]
                          • Set Variable [ $PublicKey; Value:"04488984AEC5F98721A3265485560C229D64524AE1E6CCE556069F14D29DF593547102E71F764011532C9CBCF4D3DCAC32" ]
                          • Set Variable [ $CurveID; Value:711 ]
                          • Set Variable [ $salt; Value:"7432583489543" ]
                          • Set Variable [ $MyProduct; Value:"Test Product" ]
                          • Set Variable [ $key; Value:MBS("ECKey.ReadPublicKey"; $PublicKey; $curveID) ]
                          • If [ MBS("IsError") ]
                          • Show Custom Dialog [ Message: "Failed to read key."; Default Button: “OK”, Commit: “No”; Button 2: “Cancel”, Commit: “No” ]
                          • Exit Script [ ]
                          • End If
                          • Set Variable [ $values; Value:Solution Registration::Key ]
                          • Set Variable [ $licensee; Value:GetValue($values; 1) ]
                          • Set Variable [ $enddate; Value:GetValue($values; 2) ]
                          • Set Variable [ $enddateNumber; Value:GetValue($values; 3) ]
                          • Set Variable [ $product; Value:GetValue($values; 4) ]
                          • Set Variable [ $info; Value:GetValue($values; 5) ]
                          • Set Variable [ $signature; Value:GetValue($values; 6) ]
                          • If [ $product ≠ $MyProduct ]
                          • Show Custom Dialog [ Message: "This key is not for this solution."; Default Button: “OK”, Commit: “Yes”; Button 2: “Cancel”, Commit: “No” ]
                          • Exit Script [ ]
                          • End If
                          • Set Variable [ $hashText; Value:$salt & ¶ & $licensee & ¶ & $enddate & ¶ & $enddateNumber & ¶ & $product & ¶ & $info & ¶ ]
                          • Set Variable [ $hash; Value:MBS("Hash.SHA512"; $hashText) ]
                          • Set Variable [ $r; Value:MBS("ECKey.Verify"; $key; $hash; $signature) ]
                          • If [ $r = "OK" ]
                          • If [ GetAsDate($enddateNumber) > Get ( CurrentHostTimestamp ) ]
                          • Set Field [ Solution Registration::Licensed; "yes" ]
                          • Show Custom Dialog [ Message: "Key is valid."; Default Button: “OK”, Commit: “Yes”; Button 2: “Cancel”, Commit: “No” ]
                          • Set Field [ Solution Registration::Licensee; $licensee ]
                          • Set Field [ Solution Registration::EndDate; $enddate ]
                          • Else
                          • Show Custom Dialog [ Message: "Key is too old. "; Default Button: “OK”, Commit: “Yes”; Button 2: “Cancel”, Commit: “No” ]
                          • End If
                          • Else
                          • Show Custom Dialog [ Message: "Key is not valid. " & ¶ & $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Cancel”, Commit: “No” ]
                          • End If
                          • Set Variable [ $r; Value:MBS("ECKey.Release"; $key) ]
                          • Commit Records/Requests [ Skip data entry validation; 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

                                  Download example: Solution Registration

                                  Used functions:




                                  Links
                                  MBS Xojo blog