Overview

Top  Previous  Next

Most controls use expressions to determine what is displayed.  They are simply Javascript formula, and as such you can refer to any Javascript book or the Internet for additional help.  If you've used Excel or other programs that take formulas, expressions should be pretty easy for you.  If not, its really not that much harder than using a calculator.

In addition to all the standard Javascript functionality, we have added a number of functions and variables you can use to make expressions and script easier for you.

Advanced: expressions and script all run inside a sandbox, partially to make it easier to work with, and partially to protect the application from accidental mis-coding.  Because of this, you can't use most of the functions and variables shown from any Javascript debugging environment because that environment is running outside the sandbox.  However, the sandbox is a global object which you can access called $.dc.sandbox.  So, for example, if you wanted to access the math functions, you could: $.dc.sandbox.math.sin(x), or to access global variables: $.dc.sandbox.global.myVariable.

Note that tags are not part of the sandbox.  This, again, is to protect the application.  If you want to access tag data from outside our environment, you should use $.dc.tagValue.dataSourceName.tagName.  However, this is giving you direct access to the functions so if you accidentally assign values to these variables, you will break the environment and have to refresh.