Previous Topic: isTouchpointUpNext Topic: lockResource


load

The load function loads JavaScript code that is defined in a dataset variable for use in the pre-execution or post-execution section of any operator or in the SourceCode section of the Run JavaScript Operator. The loaded JavaScript code is only good for the duration of the pre-execution, post-execution, or SourceCode section where it is loaded.

Syntax

load(jsCode)

Arguments

jsCode (String)

Specifies the JavaScript code to load.

Return Value

No value returned (void).

Examples

  1. Define a dataset object that is called Common with a parameter jsCode that contains the following JavaScript:
    function convertToUpperCase(sValue) {return sValue.toUpperCase()};
    
  2. Use the load function to load that piece of code and make functions in that code available to you:
    load(Datasets["Common"].jsCode);
    Process.ucValue = convertToUpperCase("helloworld");