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

MBS FileMaker Plugin Example Databases

Phidget Distance Sensor

All examples are included with download of MBS FileMaker Plugin.

Phidget Distance Sensor.fmp12

Overview
Tables1
Relationships0
Layouts1
Scripts9
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
Phidget Distance Sensor
18 fields defined, 1 record
Phidget Distance Sensor

Fields

Table Name: Phidget Distance Sensor - 18 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: German
          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: German
                  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: German
                          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: German
                                  Account name of the user who last modified each record
                                          DeviceNameNormal, TextAuto-Enter:
                                          • Allow editing
                                          Validation:
                                          • Only during data entry
                                          Storage:
                                          • Repetitions: 1
                                          • Indexing: None
                                          • Automatically create indexes as needed
                                          • Index Language: German
                                              DeviceSerialNumberNormal, NumberAuto-Enter:
                                              • Allow editing
                                              Validation:
                                              • Only during data entry
                                              Storage:
                                              • Repetitions: 1
                                              • Indexing: None
                                              • Automatically create indexes as needed
                                              • Index Language: German
                                                  DeviceIDNormal, NumberAuto-Enter:
                                                  • Allow editing
                                                  Validation:
                                                  • Only during data entry
                                                  Storage:
                                                  • Repetitions: 1
                                                  • Indexing: None
                                                  • Automatically create indexes as needed
                                                  • Index Language: German
                                                      DeviceLabelNormal, TextAuto-Enter:
                                                      • Allow editing
                                                      Validation:
                                                      • Only during data entry
                                                      Storage:
                                                      • Repetitions: 1
                                                      • Indexing: None
                                                      • Automatically create indexes as needed
                                                      • Index Language: German
                                                          ChannelNormal, NumberAuto-Enter:
                                                          • Allow editing
                                                          Validation:
                                                          • Only during data entry
                                                          Storage:
                                                          • Repetitions: 1
                                                          • Indexing: None
                                                          • Automatically create indexes as needed
                                                          • Index Language: German
                                                              ChannelClassNormal, NumberAuto-Enter:
                                                              • Allow editing
                                                              Validation:
                                                              • Only during data entry
                                                              Storage:
                                                              • Repetitions: 1
                                                              • Indexing: None
                                                              • Automatically create indexes as needed
                                                              • Index Language: German
                                                                  ChannelClassNameNormal, TextAuto-Enter:
                                                                  • Allow editing
                                                                  Validation:
                                                                  • Only during data entry
                                                                  Storage:
                                                                  • Repetitions: 1
                                                                  • Indexing: None
                                                                  • Automatically create indexes as needed
                                                                  • Index Language: German
                                                                      ChannelSubclassNormal, TextAuto-Enter:
                                                                      • Allow editing
                                                                      Validation:
                                                                      • Only during data entry
                                                                      Storage:
                                                                      • Repetitions: 1
                                                                      • Indexing: None
                                                                      • Automatically create indexes as needed
                                                                      • Index Language: German
                                                                          MaxDistanceNormal, NumberAuto-Enter:
                                                                          • Allow editing
                                                                          Validation:
                                                                          • Only during data entry
                                                                          Storage:
                                                                          • Repetitions: 1
                                                                          • Indexing: None
                                                                          • Automatically create indexes as needed
                                                                          • Index Language: German
                                                                              MinDistanceNormal, NumberAuto-Enter:
                                                                              • Allow editing
                                                                              Validation:
                                                                              • Only during data entry
                                                                              Storage:
                                                                              • Repetitions: 1
                                                                              • Indexing: None
                                                                              • Automatically create indexes as needed
                                                                              • Index Language: German
                                                                                  LastEventNormal, TextAuto-Enter:
                                                                                  • Allow editing
                                                                                  Validation:
                                                                                  • Only during data entry
                                                                                  Storage:
                                                                                  • Repetitions: 1
                                                                                  • Indexing: None
                                                                                  • Automatically create indexes as needed
                                                                                  • Index Language: German
                                                                                      JSONNormal, TextAuto-Enter:
                                                                                      • Allow editing
                                                                                      Validation:
                                                                                      • Only during data entry
                                                                                      Storage:
                                                                                      • Repetitions: 1
                                                                                      • Indexing: None
                                                                                      • Automatically create indexes as needed
                                                                                      • Index Language: German
                                                                                          DistanceNormal, NumberAuto-Enter:
                                                                                          • Allow editing
                                                                                          Validation:
                                                                                          • Only during data entry
                                                                                          Storage:
                                                                                          • Repetitions: 1
                                                                                          • Indexing: None
                                                                                          • Automatically create indexes as needed
                                                                                          • Index Language: German

                                                                                              Layout Objects: Phidget Distance Sensor

                                                                                              Regular Fields

                                                                                              Field Name: Phidget Distance Sensor::DeviceName
                                                                                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                                              • Top: 117 pt
                                                                                              • Left: 210 pt
                                                                                              • Bottom: 148 pt
                                                                                              • Right: 463 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: Phidget Distance Sensor::DeviceSerialNumber
                                                                                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                                              • Top: 152 pt
                                                                                              • Left: 210 pt
                                                                                              • Bottom: 183 pt
                                                                                              • Right: 463 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: Phidget Distance Sensor::DeviceID
                                                                                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                                              • Top: 187 pt
                                                                                              • Left: 210 pt
                                                                                              • Bottom: 218 pt
                                                                                              • Right: 463 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: Phidget Distance Sensor::DeviceLabel
                                                                                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                                              • Top: 222 pt
                                                                                              • Left: 210 pt
                                                                                              • Bottom: 253 pt
                                                                                              • Right: 463 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: Phidget Distance Sensor::Channel
                                                                                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                                              • Top: 257 pt
                                                                                              • Left: 210 pt
                                                                                              • Bottom: 288 pt
                                                                                              • Right: 463 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: Phidget Distance Sensor::ChannelClass
                                                                                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                                              • Top: 292 pt
                                                                                              • Left: 210 pt
                                                                                              • Bottom: 323 pt
                                                                                              • Right: 463 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: Phidget Distance Sensor::ChannelClassName
                                                                                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                                              • Top: 327 pt
                                                                                              • Left: 210 pt
                                                                                              • Bottom: 358 pt
                                                                                              • Right: 463 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: Phidget Distance Sensor::ChannelSubclass
                                                                                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                                              • Top: 362 pt
                                                                                              • Left: 210 pt
                                                                                              • Bottom: 393 pt
                                                                                              • Right: 463 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: Phidget Distance Sensor::MaxDistance
                                                                                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                                              • Top: 407 pt
                                                                                              • Left: 384 pt
                                                                                              • Bottom: 438 pt
                                                                                              • Right: 463 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: Phidget Distance Sensor::MinDistance
                                                                                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                                              • Top: 406 pt
                                                                                              • Left: 210 pt
                                                                                              • Bottom: 437 pt
                                                                                              • Right: 289 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: Phidget Distance Sensor::LastEvent
                                                                                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                                              • Top: 652 pt
                                                                                              • Left: 210 pt
                                                                                              • Bottom: 683 pt
                                                                                              • Right: 990 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: Phidget Distance Sensor::JSON
                                                                                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                                                OnObjectModify
                                                                                              • Script: <unknown>
                                                                                              • Modes: Browse
                                                                                              • Top: 462 pt
                                                                                              • Left: 210 pt
                                                                                              • Bottom: 632 pt
                                                                                              • Right: 463 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: Phidget Distance Sensor::Distance
                                                                                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                                              • Top: 407 pt
                                                                                              • Left: 297 pt
                                                                                              • Bottom: 438 pt
                                                                                              • Right: 376 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

                                                                                              Buttons

                                                                                              Button PropertiesCoordinatesScript/Script Step
                                                                                                Type:
                                                                                              • Text: Load Library
                                                                                              • Top: 117 pt
                                                                                              • Left: 498 pt
                                                                                              • Bottom: 148 pt
                                                                                              • Right: 751 pt
                                                                                              • Anchoring: Left, Top
                                                                                              Perform Script [ “Load Library” ]

                                                                                              Scripts:


                                                                                              Button PropertiesCoordinatesScript/Script Step
                                                                                                Type:
                                                                                              • Text: Open Distance Sensor
                                                                                              • Top: 156 pt
                                                                                              • Left: 498 pt
                                                                                              • Bottom: 202 pt
                                                                                              • Right: 751 pt
                                                                                              • Anchoring: Left, Top
                                                                                              Perform Script [ “Open Phidget Distance Sensor” ]

                                                                                              Scripts:


                                                                                              Button PropertiesCoordinatesScript/Script Step
                                                                                                Type:
                                                                                              • Text: Close Distance Sensor
                                                                                              • Top: 195 pt
                                                                                              • Left: 498 pt
                                                                                              • Bottom: 241 pt
                                                                                              • Right: 751 pt
                                                                                              • Anchoring: Left, Top
                                                                                              Perform Script [ “Close” ]

                                                                                              Scripts:


                                                                                              Script Hierarchy

                                                                                              Load Library
                                                                                              Open Phidget Distance Sensor
                                                                                              Close
                                                                                              Close All
                                                                                              Clear Fields
                                                                                              -
                                                                                              Attached
                                                                                              DistanceChange
                                                                                              Detached

                                                                                              Next Script: [Open Phidget Distance Sensor]
                                                                                              Script NameLoad Library
                                                                                              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
                                                                                              • If [ MBS("IsWindows") ]
                                                                                              • Set Variable [ $r; Value:MBS( "Phidget.Load"; "C:\Program Files\Phidgets\Phidget22\phidget22.dll") ]
                                                                                              • Else If [ MBS("IsMacOS") ]
                                                                                              • Set Variable [ $r; Value:MBS( "Phidget.Load"; "/Library/Frameworks/Phidget22.framework") ]
                                                                                              • Else If [ MBS("IsLinux") ]
                                                                                              • Set Variable [ $r; Value:MBS( "Phidget.Load"; "libphidget22.so") ]
                                                                                              • End If
                                                                                              • If [ $r ≠ "OK" ]
                                                                                              • Show Custom Dialog [ Title: "Failed to load library"; Message: $r; Default Button: “OK”, Commit: “Yes” ]
                                                                                              • Halt Script
                                                                                              • 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 Library]Next Script: [Close]
                                                                                                            Script NameOpen Phidget Distance Sensor
                                                                                                            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
                                                                                                              • If [ MBS("Phidget.Loaded") = 0 ]
                                                                                                              • Perform Script [ “Load Library” ]
                                                                                                              • End If
                                                                                                              • #we may want to look for network devices
                                                                                                              • Set Variable [ $$phidget; Value:MBS( "Phidget.EnableServerDiscovery"; "DeviceRemote" ) ]
                                                                                                              • Set Field [ Phidget Distance Sensor::LastEvent; "Create at " & Get(CurrentTimestamp) ]
                                                                                                              • Set Variable [ $$phidget; Value:MBS( "Phidget.Create"; "DistanceSensor" ) ]
                                                                                                              • Set Variable [ $r; Value:MBS( "Phidget.SetScriptTrigger"; $$phidget; "Attach"; Get(FileName); "Attached" ) ]
                                                                                                              • Set Variable [ $r; Value:MBS( "Phidget.SetScriptTrigger"; $$phidget; "Detach"; Get(FileName); "Detached" ) ]
                                                                                                              • #open asynchronously
                                                                                                              • Set Variable [ $r; Value:MBS( "Phidget.Open"; $$phidget ) ]
                                                                                                              • If [ $r ≠ "OK" ]
                                                                                                              • Set Field [ Phidget Distance Sensor::LastEvent; "Failed to open at " & Get(CurrentTimestamp) ]
                                                                                                              • Commit Records/Requests [ No dialog ]
                                                                                                              • Show Custom Dialog [ Title: "Failed to open device."; Message: $r; Default Button: “OK”, Commit: “Yes” ]
                                                                                                              • Else
                                                                                                              • Set Field [ Phidget Distance Sensor::LastEvent; "Opened at " & Get(CurrentTimestamp) ]
                                                                                                              • Commit Records/Requests [ No dialog ]
                                                                                                              • 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: [Open Phidget Distance Sensor]Next Script: [Close All]
                                                                                                                    Script NameClose
                                                                                                                    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
                                                                                                                      • If [ Length ( $$phidget ) > 0 ]
                                                                                                                      • Set Variable [ $r; Value:MBS("Phidget.Close"; $$phidget) ]
                                                                                                                      • Set Variable [ $r; Value:MBS("Phidget.Release"; $$phidget) ]
                                                                                                                      • Set Variable [ $$phidget; Value:"" ]
                                                                                                                      • End If
                                                                                                                      • Perform Script [ “Clear Fields” ]
                                                                                                                      • Set Field [ Phidget Distance Sensor::LastEvent; "" ]
                                                                                                                      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: [Close]Next Script: [Clear Fields]
                                                                                                                            Script NameClose All
                                                                                                                            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
                                                                                                                                • Set Variable [ $r; Value:MBS("Phidget.ReleaseAll") ]
                                                                                                                                • Set Variable [ $$phidget; Value:"" ]
                                                                                                                                • Set Field [ Phidget Distance Sensor::LastEvent; "" ]
                                                                                                                                • Perform Script [ “Clear Fields” ]
                                                                                                                                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: [Close All]Next Script: [-]
                                                                                                                                      Script NameClear Fields
                                                                                                                                      Run script with full access privilegesOff
                                                                                                                                      Siri Shortcut VisibleOff
                                                                                                                                      Include In MenuNo
                                                                                                                                      Layouts that use this script
                                                                                                                                        Scripts that use this script
                                                                                                                                        Script Definition
                                                                                                                                        Script Steps
                                                                                                                                        • Set Field [ Phidget Distance Sensor::DeviceName; "" ]
                                                                                                                                        • Set Field [ Phidget Distance Sensor::DeviceSerialNumber; "" ]
                                                                                                                                        • Set Field [ Phidget Distance Sensor::DeviceID; "" ]
                                                                                                                                        • Set Field [ Phidget Distance Sensor::DeviceLabel; "" ]
                                                                                                                                        • Set Field [ Phidget Distance Sensor::Channel; "" ]
                                                                                                                                        • Set Field [ Phidget Distance Sensor::ChannelClass; "" ]
                                                                                                                                        • Set Field [ Phidget Distance Sensor::ChannelClassName; "" ]
                                                                                                                                        • Set Field [ Phidget Distance Sensor::ChannelSubclass; "" ]
                                                                                                                                        • Set Field [ Phidget Distance Sensor::MaxDistance; "" ]
                                                                                                                                        • Set Field [ Phidget Distance Sensor::MinDistance; "" ]
                                                                                                                                        • Set Field [ Phidget Distance Sensor::Distance; "" ]
                                                                                                                                        • Set Field [ Phidget Distance Sensor::JSON; "" ]
                                                                                                                                        • 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 Fields]Next Script: [Attached]
                                                                                                                                                Script Name-
                                                                                                                                                Run script with full access privilegesOff
                                                                                                                                                Siri Shortcut VisibleOff
                                                                                                                                                Include In MenuNo
                                                                                                                                                Layouts that use this script
                                                                                                                                                  Scripts that use this script
                                                                                                                                                    Script Definition
                                                                                                                                                    Script Steps
                                                                                                                                                      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: [-]Next Script: [DistanceChange]
                                                                                                                                                                    Script NameAttached
                                                                                                                                                                    Run script with full access privilegesOff
                                                                                                                                                                    Siri Shortcut VisibleOff
                                                                                                                                                                    Include In MenuNo
                                                                                                                                                                    Layouts that use this script
                                                                                                                                                                      Scripts that use this script
                                                                                                                                                                        Script Definition
                                                                                                                                                                        Script Steps
                                                                                                                                                                        • Set Field [ Phidget Distance Sensor::LastEvent; "Attached at " & Get(CurrentTimestamp) ]
                                                                                                                                                                        • Set Variable [ $r; Value:MBS("Log"; "Attached at " & Get(CurrentTimestamp)) ]
                                                                                                                                                                        • Set Variable [ $parameter; Value:Get(ScriptParameter) ]
                                                                                                                                                                        • Set Variable [ $phidget; Value:JSONGetElement ( $parameter ; "ID" ) ]
                                                                                                                                                                        • #set change trigger to not run so often
                                                                                                                                                                        • Set Variable [ $r; Value:MBS( "Phidget.SetProperty"; $phidget; "DataInterval"; 1000 ) ]
                                                                                                                                                                        • Set Variable [ $r; Value:MBS( "Phidget.SetProperty"; $phidget; "DistanceChangeTrigger"; ,1 ) ]
                                                                                                                                                                        • Set Variable [ $r; Value:MBS( "Phidget.SetScriptTrigger"; $phidget; "DistanceChange"; Get(FileName); "DistanceChange" ) ]
                                                                                                                                                                        • Set Field [ Phidget Distance Sensor::DeviceName; MBS("Phidget.GetProperty"; $phidget; "DeviceName") ]
                                                                                                                                                                        • Set Field [ Phidget Distance Sensor::DeviceSerialNumber; MBS("Phidget.GetProperty"; $phidget; "DeviceSerialNumber") ]
                                                                                                                                                                        • Set Field [ Phidget Distance Sensor::DeviceID; MBS("Phidget.GetProperty"; $phidget; "DeviceID") ]
                                                                                                                                                                        • Set Field [ Phidget Distance Sensor::DeviceLabel; MBS("Phidget.GetProperty"; $phidget; "DeviceLabel") ]
                                                                                                                                                                        • Set Field [ Phidget Distance Sensor::Channel; MBS("Phidget.GetProperty"; $phidget; "Channel") ]
                                                                                                                                                                        • Set Field [ Phidget Distance Sensor::ChannelClass; MBS("Phidget.GetProperty"; $phidget; "ChannelClass") ]
                                                                                                                                                                        • Set Field [ Phidget Distance Sensor::ChannelClassName; MBS("Phidget.GetProperty"; $phidget; "ChannelClassName") ]
                                                                                                                                                                        • Set Field [ Phidget Distance Sensor::ChannelSubclass; MBS("Phidget.GetProperty"; $phidget; "ChannelSubclass") ]
                                                                                                                                                                        • Set Field [ Phidget Distance Sensor::MaxDistance; MBS("Phidget.GetProperty"; $phidget; "MaxDistance") ]
                                                                                                                                                                        • Set Field [ Phidget Distance Sensor::MinDistance; MBS("Phidget.GetProperty"; $phidget; "MinDistance") ]
                                                                                                                                                                        • Set Field [ Phidget Distance Sensor::Distance; "" // MBS("Phidget.GetProperty"; $phidget; "Distance") ]
                                                                                                                                                                        • 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: [Attached]Next Script: [Detached]
                                                                                                                                                                                Script NameDistanceChange
                                                                                                                                                                                Run script with full access privilegesOff
                                                                                                                                                                                Siri Shortcut VisibleOff
                                                                                                                                                                                Include In MenuNo
                                                                                                                                                                                Layouts that use this script
                                                                                                                                                                                  Scripts that use this script
                                                                                                                                                                                    Script Definition
                                                                                                                                                                                    Script Steps
                                                                                                                                                                                    • Set Variable [ $json; Value:Get(ScriptParameter) ]
                                                                                                                                                                                    • Set Field [ Phidget Distance Sensor::LastEvent; "Change at " & Get(CurrentTimestamp) ]
                                                                                                                                                                                    • Set Field [ Phidget Distance Sensor::Distance; JSONGetElement ( $json ; "distance" ) ]
                                                                                                                                                                                    • Set Field [ Phidget Distance Sensor::JSON; $json ]
                                                                                                                                                                                    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: [DistanceChange]
                                                                                                                                                                                            Script NameDetached
                                                                                                                                                                                            Run script with full access privilegesOff
                                                                                                                                                                                            Siri Shortcut VisibleOff
                                                                                                                                                                                            Include In MenuNo
                                                                                                                                                                                            Layouts that use this script
                                                                                                                                                                                              Scripts that use this script
                                                                                                                                                                                                Script Definition
                                                                                                                                                                                                Script Steps
                                                                                                                                                                                                • Set Field [ Phidget Distance Sensor::LastEvent; "Detached at " & Get(CurrentTimestamp) ]
                                                                                                                                                                                                • Set Variable [ $r; Value:MBS("Log"; "Detached at " & Get(CurrentTimestamp)) ]
                                                                                                                                                                                                • Set Variable [ $parameter; Value:Get(ScriptParameter) ]
                                                                                                                                                                                                • Perform Script [ “Clear Fields” ]
                                                                                                                                                                                                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: Phidget Distance Sensor

                                                                                                                                                                                                      Used functions: