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

MBS FileMaker Plugin Example Databases

AVAsset Test

All examples are included with download of MBS FileMaker Plugin.

AVAsset Test.fmp12

Overview
Tables3
Relationships2
Layouts3
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
AVAsset Test
2 fields defined, 0 record
AVAsset Test
Images
3 fields defined, 0 record
Images
Metadata
3 fields defined, 0 record
Metadata

Fields

Table Name: AVAsset Test - 2 Fields
Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
FileNormal, BinaryAuto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Repetitions: 1
      IDNormal, NumberAuto-Enter:
      • Allow editing
      • Serial: Generate: On creation, Next value: 1150, Increment: 1
      Validation:
      • Only during data entry
      Storage:
      • Repetitions: 1
      • Indexing: All
      • Index Language: German

        Table Name: Images - 3 Fields
        Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
        ImageNormal, BinaryAuto-Enter:
        • Allow editing
        Validation:
        • Only during data entry
        Storage:
        • Repetitions: 1
            TimeNormal, NumberAuto-Enter:
            • Allow editing
            Validation:
            • Only during data entry
            Storage:
            • Repetitions: 1
            • Indexing: None
            • Automatically create indexes as needed
            • Index Language: German
                MovieIDNormal, TextAuto-Enter:
                • Allow editing
                Validation:
                • Only during data entry
                Storage:
                • Repetitions: 1
                • Indexing: Minimal
                • Automatically create indexes as needed
                • Index Language: German

                    Table Name: Metadata - 3 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
                        ValueNormal, TextAuto-Enter:
                        • Allow editing
                        Validation:
                        • Only during data entry
                        Storage:
                        • Repetitions: 1
                        • Indexing: None
                        • Automatically create indexes as needed
                        • Index Language: German
                            MovieIDNormal, TextAuto-Enter:
                            • Allow editing
                            Validation:
                            • Only during data entry
                            Storage:
                            • Repetitions: 1
                            • Indexing: Minimal
                            • Automatically create indexes as needed
                            • Index Language: German

                              Relationship: AVAsset Test=Metadata

                              Table OccurrenceAVAsset TestMetadata
                              FieldID=MovieID
                              Source TableAVAsset TestMetadata
                              Source FileAVAsset Test.fmp12AVAsset Test.fmp12
                              Allow creation of records via this relationshipOffOff
                              Delete related records in this table when a record is deleted in the other tableOffOff
                              Sort records

                              Off

                              Off

                              Layouts

                              Layout Hierarchy

                              AVAsset Test
                              Images
                              Metadata


                              Layout NameInclude In MenuQuick Find# of ObjectsShow Records FromSave record changes automaticallyShow field frames when record is activeShow field frames only on current recordShow current record indicator in List ViewUsed in ScriptsCustom Menu SetScript TriggersTheme ID
                              AVAsset TestYesYes AVAsset TestOnOnOffOn[File Default]01
                              ImagesYesYes ImagesOnOnOffOn [File Default]01
                              MetadataYesYes MetadataOnOnOffOn [File Default]01

                              Layout Objects: AVAsset Test

                              Regular Fields

                              Field Name: AVAsset Test::File
                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                              • Top: 42 pt
                              • Left: 6 pt
                              • Bottom: 155 pt
                              • Right: 295 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

                              Field Name: Metadata::Key
                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                              • Top: 187 pt
                              • Left: 7 pt
                              • Bottom: 201 pt
                              • Right: 132 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: Metadata::Value
                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                              • Top: 187 pt
                              • Left: 133 pt
                              • Bottom: 201 pt
                              • Right: 293 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: Images::Image
                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                              • Top: 43 pt
                              • Left: 301 pt
                              • Bottom: 129 pt
                              • Right: 522 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

                              Field Name: Images::Time
                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                              • Top: 43 pt
                              • Left: 523 pt
                              • Bottom: 57 pt
                              • Right: 587 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: AVAsset Test::ID
                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                              • Top: 162 pt
                              • Left: 20 pt
                              • Bottom: 176 pt
                              • Right: 111 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

                              Group Buttons

                              Button PropertiesCoordinatesScript/Script Step
                                Type:
                              • Text: Analyze
                                Additional Properties:
                              • Change to hand cursor over button
                              • Rectangular
                              • Top: 156 pt
                              • Left: 210 pt
                              • Bottom: 181 pt
                              • Right: 295 pt
                              • Anchoring: Left, Top
                              Perform Script [ “Analyze” ]

                              Scripts:


                              Portals

                              Portal PropertiesCoordinatesFieldsOptions
                              • Top: 186 pt
                              • Left: 6 pt
                              • Bottom: 475 pt
                              • Right: 295 pt
                              • Anchoring: Left, Top
                              Field Objects
                              • Sort records: Off
                              • Filter calculation: None
                              • Initial Row: 1
                              • Number of Rows: 18

                              Portal PropertiesCoordinatesFieldsOptions
                              • Top: 42 pt
                              • Left: 300 pt
                              • Bottom: 483 pt
                              • Right: 589 pt
                              • Anchoring: Left, Top
                              Field Objects
                              • Sort records: Off
                              • Filter calculation: None
                              • Initial Row: 1
                              • Number of Rows: 5
                              • Show vertical scroll bar

                              Layout Objects: Images

                              Regular Fields

                              Field Name: Images::Image
                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                              • Top: 24 pt
                              • Left: 138 pt
                              • Bottom: 233 pt
                              • Right: 553 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

                              Field Name: Images::Time
                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                              • Top: 234 pt
                              • Left: 138 pt
                              • Bottom: 248 pt
                              • Right: 217 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: Metadata::MovieID
                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                              • Top: 234 pt
                              • Left: 300 pt
                              • Bottom: 248 pt
                              • Right: 553 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

                              Layout Objects: Metadata

                              Regular Fields

                              Field Name: Metadata::Key
                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                              • Top: 24 pt
                              • Left: 138 pt
                              • Bottom: 38 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: Metadata::Value
                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                              • Top: 42 pt
                              • Left: 138 pt
                              • Bottom: 56 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: Metadata::MovieID
                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                              • Top: 59 pt
                              • Left: 138 pt
                              • Bottom: 73 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

                              Script Hierarchy

                              Analyze

                              Script NameAnalyze
                              Run script with full access privilegesOff
                              Include In MenuYes
                              Layouts that use this script
                              Scripts that use this script
                                Script Definition
                                Script Steps
                                • Set Variable [ $MovieID; Value:AVAsset Test::ID ]
                                • #open from container
                                • Set Variable [ $asset; Value:MBS("AVAsset.OpenContainer"; AVAsset Test::File) ]
                                • If [ MBS("iserror") ]
                                • Show Custom Dialog [ Message: "Failed to load video." & ¶&¶ & $asset; Default Button: “OK”, Commit: “Yes”; Button 2: “Cancel”, Commit: “No” ]
                                • Exit Script [ Result: 0 ]
                                • End If
                                • Pause/Resume Script [ Duration (seconds): ,2 ]
                                • #check duration
                                • Set Variable [ $duration; Value:MBS("AVAsset.Duration"; $asset) ]
                                • Show Custom Dialog [ Title: "Loaded video"; Message: "Duration: " & $duration; Default Button: “OK”, Commit: “Yes”; Button 2: “Cancel”, Commit: “No” ]
                                • #check metadata
                                • Set Variable [ $formats; Value:MBS("AVAsset.AvailableMetadataFormats"; $asset) ]
                                • Set Variable [ $keys; Value:MBS("AVAsset.MetadataKeys"; $asset) ]
                                • Set Variable [ $count; Value:ValueCount ( $keys ) ]
                                • Set Variable [ $index; Value:1 ]
                                • Go to Layout [ “Metadata” (Metadata) ]
                                • Delete All Records [ No dialog ]
                                • If [ $count > 0 ]
                                • Loop
                                • #show key
                                • Set Variable [ $key; Value:GetValue($keys; $index) ]
                                • Exit Loop If [ $key = "" ]
                                • Set Variable [ $value; Value:MBS("AVAsset.Metadata"; $asset; $key) ]
                                • New Record/Request
                                • Set Field [ Metadata::Key; $key ]
                                • Set Field [ Metadata::Value; $value ]
                                • Set Field [ Metadata::MovieID; $MovieID ]
                                • Commit Records/Requests [ Skip data entry validation; No dialog ]
                                • #next
                                • Set Variable [ $index; Value:$index + 1 ]
                                • Exit Loop If [ $count = $index ]
                                • End Loop
                                • End If
                                • Go to Layout [ original layout ]
                                • #get some pictures
                                • Set Variable [ $offset; Value:10 ]
                                • Set Variable [ $duration; Value:$duration - 20 ]
                                • Go to Layout [ “Images” (Images) ]
                                • Delete All Records [ No dialog ]
                                • If [ $Duration > 10 ]
                                • Set Variable [ $index; Value:0 ]
                                • Loop
                                • #show key
                                • Set Variable [ $time; Value:$index * $duration / 10 + $offset ]
                                • Exit Loop If [ $time > $duration ]
                                • Set Variable [ $image; Value:MBS("AVAsset.Image"; $asset; $time; "png"; "preview.png") ]
                                • New Record/Request
                                • Set Field [ Images::Image; $image ]
                                • Set Field [ Images::Time; $time ]
                                • Set Field [ Images::MovieID; $MovieID ]
                                • Commit Records/Requests [ Skip data entry validation; No dialog ]
                                • #next
                                • Set Variable [ $index; Value:$index + 1 ]
                                • End Loop
                                • End If
                                • Go to Layout [ original layout ]
                                • #cleanup
                                • Set Variable [ $r; Value:MBS("AVAsset.Release"; $asset) ]
                                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: AVAsset Test

                                      Used functions: