Home > Scripting

Working with Workflow Inputs

When working with scripts that have access to the raw Workflow Inputs to your workflow, the values are read only.

While editing your script, you have access to the entire Device and Device Workflow data.

Getting a value from a Workflow Input

The script template that will get a value will look as follows:

function onXXXX(value) {
    var currentValue = WorkflowInputs.temperature;
};

function onXXXX2(value) {
    /* For geo-lcoations*
    var lat = WorkflowInputs.location.longitude;
    var lon = WorkflowInputs.location.latitude;
};

function onXXXX3(value) {
    /* For date time data types*
    var year = WorkflowInputs.dateStamp.getFullYear();
};