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

MBS FileMaker Plugin Example Databases

Phidget Digital Outputs

All examples are included with download of MBS FileMaker Plugin.

Phidget Digital Outputs.fmp12

Overview
Tables1
Relationships0
Layouts1
Scripts10
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 Outputs
14 fields defined, 1 record
Phidget Outputs

Fields

Table Name: Phidget Outputs - 14 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
                                                          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
                                                                          LastEventNormal, TextAuto-Enter:
                                                                          • Allow editing
                                                                          Validation:
                                                                          • Only during data entry
                                                                          Storage:
                                                                          • Repetitions: 1
                                                                          • Indexing: None
                                                                          • Automatically create indexes as needed
                                                                          • Index Language: German
                                                                              ConnectedNormal, NumberAuto-Enter:
                                                                              • Allow editing
                                                                              Validation:
                                                                              • Only during data entry
                                                                              Storage:
                                                                              • Repetitions: 8
                                                                              • Indexing: None
                                                                              • Automatically create indexes as needed
                                                                              • Index Language: German

                                                                                  Layout Objects: Phidget Outputs

                                                                                  Regular Fields

                                                                                  Field Name: Phidget Outputs::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 Outputs::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 Outputs::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 Outputs::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 Outputs::ChannelClassName
                                                                                  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 Outputs::LastEvent
                                                                                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                                  • Top: 750 pt
                                                                                  • Left: 210 pt
                                                                                  • Bottom: 781 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 Outputs::Connected
                                                                                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                                    Hide Condition:
                                                                                  • 1
                                                                                  • Top: 693 pt
                                                                                  • Left: 143 pt
                                                                                  • Bottom: 724 pt
                                                                                  • Right: 768 pt
                                                                                  • Anchoring: Left, Top
                                                                                  Field Format:
                                                                                  • Edit Box
                                                                                  • Show repetition: 1 through 8
                                                                                  • Orientation: horizontal
                                                                                  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: 637 pt
                                                                                  • Anchoring: Left, Top
                                                                                  Perform Script [ “Load Library” ]

                                                                                  Scripts:


                                                                                  Button PropertiesCoordinatesScript/Script Step
                                                                                    Type:
                                                                                  • Text: Open Outputs
                                                                                  • Top: 156 pt
                                                                                  • Left: 498 pt
                                                                                  • Bottom: 187 pt
                                                                                  • Right: 637 pt
                                                                                  • Anchoring: Left, Top
                                                                                  Perform Script [ “Open Outputs” ]

                                                                                  Scripts:


                                                                                  Button PropertiesCoordinatesScript/Script Step
                                                                                    Type:
                                                                                  • Text: Close Outputs
                                                                                  • Top: 195 pt
                                                                                  • Left: 498 pt
                                                                                  • Bottom: 226 pt
                                                                                  • Right: 637 pt
                                                                                  • Anchoring: Left, Top
                                                                                  Perform Script [ “Close” ]

                                                                                  Scripts:


                                                                                  Button Bars

                                                                                  Button Bar PropertiesCoordinates
                                                                                    Object Name:
                                                                                  • Toggle1
                                                                                    Orientation:
                                                                                  • horizontal
                                                                                  • Top: 336 pt
                                                                                  • Left: 215 pt
                                                                                  • Bottom: 367 pt
                                                                                  • Right: 400 pt
                                                                                  • Anchoring: Left, Top
                                                                                  Button Segments
                                                                                  Button PropertiesCoordinatesScript/Script Step
                                                                                    Type:
                                                                                  • Text:
                                                                                    Label Calculations:
                                                                                  • "Off"
                                                                                  • Top: 337 pt
                                                                                  • Left: 216 pt
                                                                                  • Bottom: 366 pt
                                                                                  • Right: 308 pt
                                                                                  Perform Script [ “Turn off”; Parameter: 1 ]

                                                                                  Scripts:

                                                                                  Button PropertiesCoordinatesScript/Script Step
                                                                                    Type:
                                                                                  • Text:
                                                                                    Label Calculations:
                                                                                  • "On"
                                                                                  • Top: 337 pt
                                                                                  • Left: 308 pt
                                                                                  • Bottom: 366 pt
                                                                                  • Right: 399 pt
                                                                                  Perform Script [ “Turn on”; Parameter: 1 ]

                                                                                  Scripts:


                                                                                  Button Bar PropertiesCoordinates
                                                                                    Object Name:
                                                                                  • Toggle2
                                                                                    Orientation:
                                                                                  • horizontal
                                                                                  • Top: 374 pt
                                                                                  • Left: 215 pt
                                                                                  • Bottom: 405 pt
                                                                                  • Right: 400 pt
                                                                                  • Anchoring: Left, Top
                                                                                  Button Segments
                                                                                  Button PropertiesCoordinatesScript/Script Step
                                                                                    Type:
                                                                                  • Text:
                                                                                    Label Calculations:
                                                                                  • "Off"
                                                                                  • Top: 375 pt
                                                                                  • Left: 216 pt
                                                                                  • Bottom: 404 pt
                                                                                  • Right: 308 pt
                                                                                  Perform Script [ “Turn off”; Parameter: 2 ]

                                                                                  Scripts:

                                                                                  Button PropertiesCoordinatesScript/Script Step
                                                                                    Type:
                                                                                  • Text:
                                                                                    Label Calculations:
                                                                                  • "On"
                                                                                  • Top: 375 pt
                                                                                  • Left: 308 pt
                                                                                  • Bottom: 404 pt
                                                                                  • Right: 399 pt
                                                                                  Perform Script [ “Turn on”; Parameter: 2 ]

                                                                                  Scripts:


                                                                                  Button Bar PropertiesCoordinates
                                                                                    Object Name:
                                                                                  • Toggle3
                                                                                    Orientation:
                                                                                  • horizontal
                                                                                  • Top: 412 pt
                                                                                  • Left: 215 pt
                                                                                  • Bottom: 443 pt
                                                                                  • Right: 400 pt
                                                                                  • Anchoring: Left, Top
                                                                                  Button Segments
                                                                                  Button PropertiesCoordinatesScript/Script Step
                                                                                    Type:
                                                                                  • Text:
                                                                                    Label Calculations:
                                                                                  • "Off"
                                                                                  • Top: 413 pt
                                                                                  • Left: 216 pt
                                                                                  • Bottom: 442 pt
                                                                                  • Right: 308 pt
                                                                                  Perform Script [ “Turn off”; Parameter: 3 ]

                                                                                  Scripts:

                                                                                  Button PropertiesCoordinatesScript/Script Step
                                                                                    Type:
                                                                                  • Text:
                                                                                    Label Calculations:
                                                                                  • "On"
                                                                                  • Top: 413 pt
                                                                                  • Left: 308 pt
                                                                                  • Bottom: 442 pt
                                                                                  • Right: 399 pt
                                                                                  Perform Script [ “Turn on”; Parameter: 3 ]

                                                                                  Scripts:


                                                                                  Button Bar PropertiesCoordinates
                                                                                    Object Name:
                                                                                  • Toggle4
                                                                                    Orientation:
                                                                                  • horizontal
                                                                                  • Top: 450 pt
                                                                                  • Left: 215 pt
                                                                                  • Bottom: 481 pt
                                                                                  • Right: 400 pt
                                                                                  • Anchoring: Left, Top
                                                                                  Button Segments
                                                                                  Button PropertiesCoordinatesScript/Script Step
                                                                                    Type:
                                                                                  • Text:
                                                                                    Label Calculations:
                                                                                  • "Off"
                                                                                  • Top: 451 pt
                                                                                  • Left: 216 pt
                                                                                  • Bottom: 480 pt
                                                                                  • Right: 308 pt
                                                                                  Perform Script [ “Turn off”; Parameter: 4 ]

                                                                                  Scripts:

                                                                                  Button PropertiesCoordinatesScript/Script Step
                                                                                    Type:
                                                                                  • Text:
                                                                                    Label Calculations:
                                                                                  • "On"
                                                                                  • Top: 451 pt
                                                                                  • Left: 308 pt
                                                                                  • Bottom: 480 pt
                                                                                  • Right: 399 pt
                                                                                  Perform Script [ “Turn on”; Parameter: 4 ]

                                                                                  Scripts:


                                                                                  Button Bar PropertiesCoordinates
                                                                                    Object Name:
                                                                                  • Toggle5
                                                                                    Orientation:
                                                                                  • horizontal
                                                                                  • Top: 488 pt
                                                                                  • Left: 215 pt
                                                                                  • Bottom: 519 pt
                                                                                  • Right: 400 pt
                                                                                  • Anchoring: Left, Top
                                                                                  Button Segments
                                                                                  Button PropertiesCoordinatesScript/Script Step
                                                                                    Type:
                                                                                  • Text:
                                                                                    Label Calculations:
                                                                                  • "Off"
                                                                                  • Top: 489 pt
                                                                                  • Left: 216 pt
                                                                                  • Bottom: 518 pt
                                                                                  • Right: 308 pt
                                                                                  Perform Script [ “Turn off”; Parameter: 5 ]

                                                                                  Scripts:

                                                                                  Button PropertiesCoordinatesScript/Script Step
                                                                                    Type:
                                                                                  • Text:
                                                                                    Label Calculations:
                                                                                  • "On"
                                                                                  • Top: 489 pt
                                                                                  • Left: 308 pt
                                                                                  • Bottom: 518 pt
                                                                                  • Right: 399 pt
                                                                                  Perform Script [ “Turn on”; Parameter: 5 ]

                                                                                  Scripts:


                                                                                  Button Bar PropertiesCoordinates
                                                                                    Object Name:
                                                                                  • Toggle6
                                                                                    Orientation:
                                                                                  • horizontal
                                                                                  • Top: 526 pt
                                                                                  • Left: 215 pt
                                                                                  • Bottom: 557 pt
                                                                                  • Right: 400 pt
                                                                                  • Anchoring: Left, Top
                                                                                  Button Segments
                                                                                  Button PropertiesCoordinatesScript/Script Step
                                                                                    Type:
                                                                                  • Text:
                                                                                    Label Calculations:
                                                                                  • "Off"
                                                                                  • Top: 527 pt
                                                                                  • Left: 216 pt
                                                                                  • Bottom: 556 pt
                                                                                  • Right: 308 pt
                                                                                  Perform Script [ “Turn off”; Parameter: 6 ]

                                                                                  Scripts:

                                                                                  Button PropertiesCoordinatesScript/Script Step
                                                                                    Type:
                                                                                  • Text:
                                                                                    Label Calculations:
                                                                                  • "On"
                                                                                  • Top: 527 pt
                                                                                  • Left: 308 pt
                                                                                  • Bottom: 556 pt
                                                                                  • Right: 399 pt
                                                                                  Perform Script [ “Turn on”; Parameter: 7 ]

                                                                                  Scripts:


                                                                                  Button Bar PropertiesCoordinates
                                                                                    Object Name:
                                                                                  • Toggle7
                                                                                    Orientation:
                                                                                  • horizontal
                                                                                  • Top: 563 pt
                                                                                  • Left: 215 pt
                                                                                  • Bottom: 594 pt
                                                                                  • Right: 400 pt
                                                                                  • Anchoring: Left, Top
                                                                                  Button Segments
                                                                                  Button PropertiesCoordinatesScript/Script Step
                                                                                    Type:
                                                                                  • Text:
                                                                                    Label Calculations:
                                                                                  • "Off"
                                                                                  • Top: 564 pt
                                                                                  • Left: 216 pt
                                                                                  • Bottom: 593 pt
                                                                                  • Right: 308 pt
                                                                                  Perform Script [ “Turn off”; Parameter: 7 ]

                                                                                  Scripts:

                                                                                  Button PropertiesCoordinatesScript/Script Step
                                                                                    Type:
                                                                                  • Text:
                                                                                    Label Calculations:
                                                                                  • "On"
                                                                                  • Top: 564 pt
                                                                                  • Left: 308 pt
                                                                                  • Bottom: 593 pt
                                                                                  • Right: 399 pt
                                                                                  Perform Script [ “Turn on”; Parameter: 7 ]

                                                                                  Scripts:


                                                                                  Button Bar PropertiesCoordinates
                                                                                    Object Name:
                                                                                  • Toggle8
                                                                                    Orientation:
                                                                                  • horizontal
                                                                                  • Top: 600 pt
                                                                                  • Left: 215 pt
                                                                                  • Bottom: 631 pt
                                                                                  • Right: 400 pt
                                                                                  • Anchoring: Left, Top
                                                                                  Button Segments
                                                                                  Button PropertiesCoordinatesScript/Script Step
                                                                                    Type:
                                                                                  • Text:
                                                                                    Label Calculations:
                                                                                  • "Off"
                                                                                  • Top: 601 pt
                                                                                  • Left: 216 pt
                                                                                  • Bottom: 630 pt
                                                                                  • Right: 308 pt
                                                                                  Perform Script [ “Turn off”; Parameter: 8 ]

                                                                                  Scripts:

                                                                                  Button PropertiesCoordinatesScript/Script Step
                                                                                    Type:
                                                                                  • Text:
                                                                                    Label Calculations:
                                                                                  • "On"
                                                                                  • Top: 601 pt
                                                                                  • Left: 308 pt
                                                                                  • Bottom: 630 pt
                                                                                  • Right: 399 pt
                                                                                  Perform Script [ “Turn on”; Parameter: 8 ]

                                                                                  Scripts:


                                                                                  Graphic Objects

                                                                                  Graphic Object PropertiesCoordinates
                                                                                    Type:
                                                                                  • Text: Connected
                                                                                    Hide Condition:
                                                                                  • 1
                                                                                  • Top: 698 pt
                                                                                  • Left: 48 pt
                                                                                  • Bottom: 719 pt
                                                                                  • Right: 132 pt
                                                                                  • Anchoring: Left, Top

                                                                                  Script Hierarchy

                                                                                  Load Library
                                                                                  Open Outputs
                                                                                  Close
                                                                                  Close All
                                                                                  Turn on
                                                                                  Turn off
                                                                                  Clear Fields
                                                                                  -
                                                                                  Attached
                                                                                  Detached

                                                                                  Next Script: [Open Outputs]
                                                                                  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 Outputs
                                                                                                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
                                                                                                  • Set Field [ Phidget Outputs::LastEvent; "Create at " & Get(CurrentTimestamp) ]
                                                                                                  • Set Variable [ $count; Value:8 ]
                                                                                                  • Set Variable [ $index; Value:1 ]
                                                                                                  • If [ $index ≤ $count ]
                                                                                                  • Loop [ Flush: Always ]
                                                                                                  • #your script steps here
                                                                                                  • Set Variable [ $phidget; Value:MBS( "Phidget.Create"; "DigitalOutput" ) ]
                                                                                                  • Set Field [ Phidget Outputs::Connected[$index]; "" ]
                                                                                                  • 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.SetProperty"; $phidget; "Channel"; $index-1 ) // range 0 to 7 ]
                                                                                                  • Set Variable [ $r; Value:MBS( "Phidget.Open"; $phidget ) ]
                                                                                                  • If [ $r ≠ "OK" ]
                                                                                                  • Set Field [ Phidget Outputs::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 Outputs::LastEvent; "Opened at " & Get(CurrentTimestamp) ]
                                                                                                  • Commit Records/Requests [ No dialog ]
                                                                                                  • End If
                                                                                                  • #remmeber in global variable
                                                                                                  • Set Variable [ $$phidgets[$index]; Value:$phidget ]
                                                                                                  • #next
                                                                                                  • Set Variable [ $index; Value:$index + 1 ]
                                                                                                  • Exit Loop If [ $index > $count ]
                                                                                                  • End Loop
                                                                                                  • 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 Outputs]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
                                                                                                          • Perform Script [ “Clear Fields” ]
                                                                                                          • # loop over 8 digital outputs
                                                                                                          • Set Variable [ $count; Value:8 ]
                                                                                                          • Set Variable [ $index; Value:1 ]
                                                                                                          • If [ $index ≤ $count ]
                                                                                                          • Loop [ Flush: Always ]
                                                                                                          • #Close individual outputs
                                                                                                          • If [ Length ( $$phidgets[$index] ) > 0 ]
                                                                                                          • Set Variable [ $r; Value:MBS("Phidget.Close"; $$phidgets[$index]) ]
                                                                                                          • Set Variable [ $r; Value:MBS("Phidget.Release"; $$phidgets[$index]) ]
                                                                                                          • Set Variable [ $$phidgets[$index]; Value:"" ]
                                                                                                          • End If
                                                                                                          • Set Field [ Phidget Outputs::Connected[$index]; "" ]
                                                                                                          • #next
                                                                                                          • Set Variable [ $index; Value:$index + 1 ]
                                                                                                          • Exit Loop If [ $index > $count ]
                                                                                                          • End Loop
                                                                                                          • End If
                                                                                                          • Set Field [ Phidget Outputs::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: [Turn on]
                                                                                                                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") ]
                                                                                                                    • # loop over 8 digital outputs
                                                                                                                    • Set Variable [ $count; Value:8 ]
                                                                                                                    • Set Variable [ $index; Value:1 ]
                                                                                                                    • If [ $index ≤ $count ]
                                                                                                                    • Loop [ Flush: Always ]
                                                                                                                    • Set Variable [ $$phidgets[$index]; Value:"" ]
                                                                                                                    • Set Field [ Phidget Outputs::Connected[$index]; "" ]
                                                                                                                    • #next
                                                                                                                    • Set Variable [ $index; Value:$index + 1 ]
                                                                                                                    • Exit Loop If [ $index > $count ]
                                                                                                                    • End Loop
                                                                                                                    • End If
                                                                                                                    • Perform Script [ “Clear Fields” ]
                                                                                                                    • Set Field [ Phidget Outputs::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 All]Next Script: [Turn off]
                                                                                                                          Script NameTurn on
                                                                                                                          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 [ $index; Value:Get(ScriptParameter) ]
                                                                                                                            • If [ Length ( $$phidgets[$index] ) > 0 ]
                                                                                                                            • Set Variable [ $r; Value:MBS( "Phidget.SetProperty"; $$phidgets[$index]; "State"; 1) ]
                                                                                                                            • End If
                                                                                                                            Fields used in this script
                                                                                                                              Scripts used in this script
                                                                                                                                Layouts used in this script
                                                                                                                                  Tables used in this script
                                                                                                                                    Table occurrences used by this script
                                                                                                                                      Custom Functions used by this script
                                                                                                                                        Custom menu set used by this script

                                                                                                                                          Previous Script: [Turn on]Next Script: [Clear Fields]
                                                                                                                                          Script NameTurn off
                                                                                                                                          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 [ $index; Value:Get(ScriptParameter) ]
                                                                                                                                            • If [ Length ( $$phidgets[$index] ) > 0 ]
                                                                                                                                            • Set Variable [ $r; Value:MBS( "Phidget.SetProperty"; $$phidgets[$index]; "State"; 0) ]
                                                                                                                                            • 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: [Turn off]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 Outputs::DeviceName; "" ]
                                                                                                                                                            • Set Field [ Phidget Outputs::DeviceSerialNumber; "" ]
                                                                                                                                                            • Set Field [ Phidget Outputs::DeviceID; "" ]
                                                                                                                                                            • Set Field [ Phidget Outputs::DeviceLabel; "" ]
                                                                                                                                                            • Set Field [ Phidget Outputs::ChannelClass; "" ]
                                                                                                                                                            • Set Field [ Phidget Outputs::ChannelClassName; "" ]
                                                                                                                                                            • Set Field [ Phidget Outputs::ChannelSubclass; "" ]
                                                                                                                                                            • 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: [Detached]
                                                                                                                                                                                        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 Outputs::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 Variable [ $channel; Value:MBS("Phidget.GetProperty"; $phidget; "Channel") ]
                                                                                                                                                                                            • Set Field [ Phidget Outputs::Connected[$channel + 1]; 1 ]
                                                                                                                                                                                            • If [ $channel = 0 ]
                                                                                                                                                                                            • #we only query all this for first one
                                                                                                                                                                                            • Set Field [ Phidget Outputs::DeviceName; MBS("Phidget.GetProperty"; $phidget; "DeviceName") ]
                                                                                                                                                                                            • Set Field [ Phidget Outputs::DeviceSerialNumber; MBS("Phidget.GetProperty"; $phidget; "DeviceSerialNumber") ]
                                                                                                                                                                                            • Set Field [ Phidget Outputs::DeviceID; MBS("Phidget.GetProperty"; $phidget; "DeviceID") ]
                                                                                                                                                                                            • Set Field [ Phidget Outputs::DeviceLabel; MBS("Phidget.GetProperty"; $phidget; "DeviceLabel") ]
                                                                                                                                                                                            • Set Field [ Phidget Outputs::ChannelClass; MBS("Phidget.GetProperty"; $phidget; "ChannelClass") ]
                                                                                                                                                                                            • Set Field [ Phidget Outputs::ChannelClassName; MBS("Phidget.GetProperty"; $phidget; "ChannelClassName") ]
                                                                                                                                                                                            • Set Field [ Phidget Outputs::ChannelSubclass; MBS("Phidget.GetProperty"; $phidget; "ChannelSubclass") ]
                                                                                                                                                                                            • 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: [Attached]
                                                                                                                                                                                                    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 Outputs::LastEvent; "Detached at " & Get(CurrentTimestamp) ]
                                                                                                                                                                                                        • Set Variable [ $r; Value:MBS("Log"; "Detached at " & Get(CurrentTimestamp)) ]
                                                                                                                                                                                                        • Set Variable [ $parameter; Value:Get(ScriptParameter) ]
                                                                                                                                                                                                        • Set Variable [ $phidget; Value:JSONGetElement ( $parameter ; "ID" ) ]
                                                                                                                                                                                                        • Set Variable [ $channel; Value:MBS("Phidget.GetProperty"; $phidget; "Channel") ]
                                                                                                                                                                                                        • Set Field [ Phidget Outputs::Connected[$channel + 1]; 1 ]
                                                                                                                                                                                                        • 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 Digital Outputs

                                                                                                                                                                                                              Used functions: