Javascript in Formulas

Cloud Elements includes several step types that allow you to write your own custom Javascript. The function signature for all JS-related step types looks like:

/**
 * @param  trigger The trigger that started this execution
 * @param  steps   The list of steps that have been executed up until this point for this execution and all of their step execution values
 * @param  info    Metadata about this formula
 * @param  config  The configuration values set on the formula instance (config variables)
 * @param  done    The callback function that you will need to call at the end of your script step
 */
function (trigger, steps, info, config, done) {
  // your Javascript will be executed here
}

Note the following when writing javascript in formulas:

Functions

Libraries