Clicked vs Pressed (Solution and documentation excerpt on how to use and reference Global Variables included within)

I figured it out - thank you as your last response sealed the deal!

I think the fact that the variables are configured under a “Virtual Device” and the functions being SetDeviceAttribute and GetDeviceAttribute threw our dialog off (completely unintuitive). In the end, we were in fact talking about the same thing.

So for anyone who has this question in the furture, here’s a little documentation for you:

  1. Use a script as the event action (yes there will be a warning that it’s not recommended…just ignore it with hopes it doesn’t go away).

  2. let variable be the name of the variable configured under your Virtual Device (the name of the VirtualDevice is not material). This will be exposed in the app as a global variable that can be called via javascript.

  • to read
    var myValue = App.GetDeviceAttribute(variable);
  • to write
    App.SetDeviceAttribute(variable,myValue);