Script format for defining Workflow parameter value

Hopefully a basic question but can't find an answer; When using a script to set the value of a Parameter in the Workflow options and start conditions, how is the script defined? I've tried using the below, but the Parameter value is empty, I cant find an example of setting the value in the SDK:

function onInit($context){

 $workflow.Parameter("TestParam")="Test Value"

}

Top Replies

Parents
  • Scripts created to return values to workflow parameters can simply be given a name and the name of the function in this case probably shouldn't be the built-in function name of OnInit. Save the script and then within the workflow parameter's settings, you can select the script and the function name.

    Reworking your script example, it could be something like this

    function TestValue ($Request) {

     Return "Test Value"

    }

Reply
  • Scripts created to return values to workflow parameters can simply be given a name and the name of the function in this case probably shouldn't be the built-in function name of OnInit. Save the script and then within the workflow parameter's settings, you can select the script and the function name.

    Reworking your script example, it could be something like this

    function TestValue ($Request) {

     Return "Test Value"

    }

Children
No Data