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

MBS FileMaker Plugin Example Databases

AV Recorder Record Dictation

All examples are included with download of MBS FileMaker Plugin.

AV Recorder Record Dictation.fmp12

Overview
Tables1
Relationships0
Layouts1
Scripts2
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
AV Recorder Record Dictation
6 fields defined, 1 record
AV Recorder Record Dictation

Fields

Table Name: AV Recorder Record Dictation - 6 Fields
Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
PrimaryKeyNormal, TextAuto-Enter: Validation:
  • Only during data entry
  • Not empty
  • Unique
  • Strict validation
Storage:
  • Repetitions: 1
  • Indexing: Minimal
  • Automatically create indexes as needed
  • Index Language: Unicode Raw
Unique identifier of each record in this table
          CreationTimestampNormal, TimestampAuto-Enter:
          • Creation timestamp
          Validation:
          • Only during data entry
          • Strict data type: 4 digit year
          • Not empty
          • Strict validation
          Storage:
          • Repetitions: 1
          • Indexing: None
          • Automatically create indexes as needed
          • Index Language: English
          Date and time each record was created
                  CreatedByNormal, TextAuto-Enter:
                  • Creation account name
                  Validation:
                  • Only during data entry
                  • Not empty
                  • Strict validation
                  Storage:
                  • Repetitions: 1
                  • Indexing: None
                  • Automatically create indexes as needed
                  • Index Language: English
                  Account name of the user who created each record
                          ModificationTimestampNormal, TimestampAuto-Enter:
                          • Modification timestamp
                          Validation:
                          • Only during data entry
                          • Strict data type: 4 digit year
                          • Not empty
                          • Strict validation
                          Storage:
                          • Repetitions: 1
                          • Indexing: None
                          • Automatically create indexes as needed
                          • Index Language: English
                          Date and time each record was last modified
                                  ModifiedByNormal, TextAuto-Enter:
                                  • Modification account name
                                  Validation:
                                  • Only during data entry
                                  • Not empty
                                  • Strict validation
                                  Storage:
                                  • Repetitions: 1
                                  • Indexing: None
                                  • Automatically create indexes as needed
                                  • Index Language: English
                                  Account name of the user who last modified each record
                                          SoundFileContainerNormal, BinaryAuto-Enter:
                                          • Allow editing
                                          Validation:
                                          • Only during data entry
                                          Storage:
                                          • Repetitions: 1

                                              Layout Objects: AV Recorder Record Dictation

                                              Regular Fields

                                              Field Name: AV Recorder Record Dictation::SoundFileContainer
                                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                              • Top: 43 pt
                                              • Left: 26 pt
                                              • Bottom: 210 pt
                                              • Right: 279 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: Start Recording
                                              • Top: 43 pt
                                              • Left: 291 pt
                                              • Bottom: 85 pt
                                              • Right: 528 pt
                                              • Anchoring: Left, Top
                                              Perform Script [ “Start Record Session” ]

                                              Scripts:


                                              Button PropertiesCoordinatesScript/Script Step
                                                Type:
                                              • Text: Stop Recording
                                              • Top: 85 pt
                                              • Left: 291 pt
                                              • Bottom: 127 pt
                                              • Right: 528 pt
                                              • Anchoring: Left, Top
                                              Perform Script [ “Stop Recording” ]

                                              Scripts:


                                              Button PropertiesCoordinatesScript/Script Step
                                                Type:
                                              • Text: Clear Recording
                                              • Top: 127 pt
                                              • Left: 291 pt
                                              • Bottom: 169 pt
                                              • Right: 528 pt
                                              • Anchoring: Left, Top
                                              Clear [ AV Recorder Record Dictation::SoundFileContainer ] [ Select ]

                                              Fields:


                                              Button PropertiesCoordinatesScript/Script Step
                                                Type:
                                              • Text: Export Recording
                                              • Top: 168 pt
                                              • Left: 291 pt
                                              • Bottom: 210 pt
                                              • Right: 528 pt
                                              • Anchoring: Left, Top
                                              Export Field Contents [ AV Recorder Record Dictation::SoundFileContainer; Create directories:No ]

                                              Fields:


                                              Web Viewer Controls

                                              Web Viewer Control PropertiesCoordinatesWeb Address
                                                Object Name:
                                              • WebViewer
                                                Hide Condition:
                                              • IsEmpty ( $$AnimationURL )
                                                Additional Properties:
                                              • Automatically encode URL
                                              • Top: 105 pt
                                              • Left: 125 pt
                                              • Bottom: 147 pt
                                              • Right: 179 pt
                                              • Anchoring: Left, Top
                                              $$AnimationURL

                                              Script Hierarchy

                                              Start Record Session
                                              Stop Recording

                                              Next Script: [Stop Recording]
                                              Script NameStart Record Session
                                              Run script with full access privilegesOff
                                              Include In MenuNo
                                              Layouts that use this script
                                              Scripts that use this script
                                                Script Definition
                                                Script Steps
                                                • If [ not IsEmpty ( $$SessionID ) ]
                                                • Show Custom Dialog [ Title: "Recording already running"; Message: "A recording is already running."; Default Button: “Continue”, Commit: “Yes”; Button 2: “Stop”, Commit: “No” ]
                                                • If [ Get(LastMessageChoice)=1 ]
                                                • #Already playing
                                                • Halt Script
                                                • End If
                                                • If [ Get(LastMessageChoice) = 2 ]
                                                • #Stop device
                                                • Perform Script [ “Stop Recording” ]
                                                • Halt Script
                                                • End If
                                                • End If
                                                • Set Variable [ $$SessionID; Value:MBS("AVRecorder.Init") ]
                                                • #Pick audio device if we have more than one
                                                • Set Variable [ $Count; Value:MBS("AVRecorder.AudioDeviceCount" ; $$SessionID) ]
                                                • If [ $Count > 1 ]
                                                • Set Variable [ $Index; Value:0 ]
                                                • Set Variable [ $InputDeviceList; Value:"" ]
                                                • Loop
                                                • Set Variable [ $InputDeviceList; Value:$InputDeviceList & If ( not IsEmpty ( $InputDeviceList ) ; "¶"; "" ) & GetAsText ( $Index ) & ": " & MBS("AVRecorder.AudioDeviceInfo"; $$SessionID; $index; "Name") ]
                                                • Set Variable [ $Index; Value:$Index + 1 ]
                                                • Exit Loop If [ $Index ≥ $Count ]
                                                • End Loop
                                                • #Last device is default one
                                                • Set Variable [ $Index; Value:$Index - 1 ]
                                                • Show Custom Dialog [ Title: "Mehr als 1 Input Device"; Message: $InputDeviceList; Default Button: “OK”, Commit: “Yes”; Button 2: “Cancel”, Commit: “No”; Input #1: $Index, "Bitte wählen: " ]
                                                • If [ Get(LastMessageChoice) = 2 or $Index < 0 or $Index > $Count ]
                                                • Set Variable [ $r; Value:MBS("AVRecorder.Release"; $$SessionID) ]
                                                • Set Variable [ $$SessionID; Value:"" ]
                                                • Halt Script
                                                • Else
                                                • Set Variable [ $r; Value:MBS( "AVRecorder.SetAudioDevice"; $$SessionID; $Index ) ]
                                                • End If
                                                • Else
                                                • Set Variable [ $r; Value:MBS("AVRecorder.SetAudioDevice"; $$SessionID; 0) ]
                                                • End If
                                                • #make path for temp file
                                                • Set Variable [ $$FMFilePath; Value:Get(DesktopPath) & If ( Get(SystemPlatform )= 1; "Soundfile.m4a"; "Soundfile.avi") ]
                                                • Set Variable [ $MBSFilePath; Value:MBS( "Path.FileMakerPathToNativePath"; $$FMFilePath ) ]
                                                • Clear [ AV Recorder Record Dictation::SoundFileContainer ] [ Select ]
                                                • Commit Records/Requests [ No dialog ]
                                                • #check permission on macOS
                                                • If [ Get(SystemPlatform )= 1 and MBS( "AVRecorder.AuthorizationStatusForMediaType"; "audio" ) = "NotDetermined" ]
                                                • Show Custom Dialog [ Title: "Access to microphone"; Message: "Please allow access to microphone for FileMaker."; Default Button: “OK”, Commit: “Yes” ]
                                                • Set Variable [ $r; Value:MBS( "AVRecorder.RequestAccessForMediaType"; "audio" ) ]
                                                • If [ MBS("IsError") or MBS( "AVRecorder.AuthorizationStatusForMediaType"; "audio" ) = "NotDetermined" ]
                                                • Show Custom Dialog [ Title: "Error"; Message: "Permissions denied. Error: " & MBS("IsError") & "¶Init: " & $r; Default Button: “Stopp”, Commit: “Yes” ]
                                                • Set Variable [ $r; Value:MBS("AVRecorder.Release"; $$SessionID) ]
                                                • Halt Script
                                                • End If
                                                • End If
                                                • #set temp file
                                                • Set Variable [ $r; Value:MBS("AVRecorder.SetFilePath"; $$SessionID; $MBSFilePath) ]
                                                • If [ MBS("IsError") ]
                                                • Show Custom Dialog [ Title: "Error"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Cancel”, Commit: “No” ]
                                                • Perform Script [ “Stop Recording” ]
                                                • Exit Script [ ]
                                                • End If
                                                • Set Variable [ $r; Value:MBS("AVRecorder.StartRecording"; $$SessionID) ]
                                                • If [ MBS("IsError") ]
                                                • Show Custom Dialog [ Title: "Error"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Cancel”, Commit: “No” ]
                                                • Perform Script [ “Stop Recording” ]
                                                • Exit Script [ ]
                                                • End If
                                                • #start the animation
                                                • Set Variable [ $$AnimationURL; Value:"data:image/gif;base64,R0lGODlhIAAgAPcAAP///7Ozs/v7+9bW1uHh4fLy8rq6uoGBgTQ0NAEBARsbG8TExJeXl/39/VRUVAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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ADgAYABIAAAh9AAEIHEiwIIABCBMOKGCw4UCFCh06TLggIQGJGDNiHKAxowEDHDsa/EjyosiBBRaQNLBA5AAGJgmsDHnwgIGGDAwO+GgSAIMDB3ISJMCgKMYFQA+YFApgAVOHSW86LNpyZFKCT30aNZi0KsasAq9iPVDQa1mpA3OCPUmzY0AAIfkEBQoAAAAsAgASAB0ADgAACIkAAQgcSLCgQQAEDhIkwEChQQIDBiQ8aODAAQMOCUbcWECjxY8ZNW6MKJDBxwMMBmQkgHHgSJYnWyZcYHCAAQM0B0JUWfFAAII/AWBkQBRAgZsGJj4sqBJAQ6dQAdi8GXLgU4JFBS642bRqVKhXWVINWbQr0asAtrasihatS6UOu2IN6pXt2owBAQAh+QQFCgAAACwAAA8AGQARAAAIgAAXHBhI8ACAgwgTKjxYsODChwkFEnQwEKLFixgxFjCQseOCjg8ZgIQYIGEAAhgHQGTAQOXBlgsJDJiZ0CVHhCxFAjDAE4DMmQUSBlXIEiHPmz9dWmT5cWfPgzMHoHy4oKjRp1BpLk14tKbWhVav3kQ4FWJThAsMnB2p0EDZhAEBACH5BAUKAAAALAEACAARABgAAAh3AAccOGAAgMGDCA8aGDhwQcKHABgOZDAAIsIFEg9YTBhgYMGNHEGKHEmypMmTKDcuYMCgJEuWIF++BLmyJcICHx+ydHhwgQEDFQcINUggIYGfBgoAEFoRItKmTCEOQHow6kOkRQ1aTfizqdahDwl4/ToWpFgAAQEAIfkEBQoAAAAsAAACAA4AHQAACIoAAQgcCGCBAYIIBx44wCAhwoUHBjgcGADiRIULD15cYJFgQ4IQP3qUCIDAgQAEUYokMHHAR5ETFwiUeRFAAY01WzLYyROmwJ49E7rcCYBnzqMISV4cYMCAUoQEmkp1aFDqggJCrQ4kMACrwKhOCQ4Yy1Kg14EFxg4o61At24Rcx9ZUm1NuzgJvAwIAOw==" ]
                                                • Refresh Object [ Object Name: "WebViewer"; Repetition: 1 ]
                                                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: [Start Record Session]
                                                      Script NameStop Recording
                                                      Run script with full access privilegesOff
                                                      Include In MenuNo
                                                      Layouts that use this script
                                                      Scripts that use this script
                                                      Script Definition
                                                      Script Steps
                                                      • #stop recording and cleanup
                                                      • Set Variable [ $r; Value:MBS("AVRecorder.StopRecording"; $$SessionID) ]
                                                      • Set Variable [ $r; Value:MBS("AVRecorder.Release"; $$SessionID) ]
                                                      • Set Variable [ $$SessionID; Value:"" ]
                                                      • Set Error Capture [ On ]
                                                      • #Now import the temp file
                                                      • Insert File [ AV Recorder Record Dictation::SoundFileContainer; “$$FMFilePath” ]
                                                      • <unknown> [ “$$FMFIlePath” ]
                                                      • Set Variable [ $$FMFilePath; Value:"" ]
                                                      • Set Variable [ $$AnimationURL; Value:"" ]
                                                      • #stop the animation
                                                      • Refresh Object [ Object Name: "WebViewer"; Repetition: 1 ]
                                                      • Halt Script
                                                      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: AV Recorder Record Dictation

                                                              Used functions: