Set Field Value is a Script Component, a predefined script to use on Script Tasks that automatically set a value on a form field.

This is useful for automating steps in process applications. 

Add the Set Field Value component to a process

  1. Open the Component section in the left panel of the modeller

  2. Drag and drop the component Set Field Value onto your canvas.

  3. Close the configuration window, add your new Script Task to your model and connect all Form Templates and Data Objects you want to set and get values to and from.

  4. Open the script task settings and click on Configure scripts to open the configuration view

  5. Choose what Form Template or Data Object and what field you would like to set data to.
    A drop down list will be shown containing all available fields in the chosen from.

    : the Form Template or Data Object must be as an output to the Script Task.

  6. Select where to take the value from, you have two choices; Data Object or Custom Value:

    a) Data Object: Choose the data object and field you wish to collect the value from in the drop down lists.

    NOTE: If you use Data Object, the object must be as an input to the Script Task.

    b) Custom Value: Here you can write variables or plain text that will be set to the form field.
    Read more about variables in the article Variables.

  7. Click on Save.

How to set values to multiple form field in the same Script Task

If you want to set more than one value drag and drop another Script Component from the Component section in the Asset Browser onto your existing Script Task and configure your second script component.

NOTE: You can also drag and drop the Script Component onto an already existing Task in your process to transform it to a Script Task with the Script Component set on it.