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
Open the Component section in the left panel of the modeller
- Drag and drop the component Set Field Value onto your canvas.
- 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.
- Open the script task settings and click on Configure scripts to open the configuration view
- 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.
NOTE: the Form Template or Data Object must be as an output to the Script Task.
- 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.
b) Custom Value: Here you can write variables or plain text that will be set to the form field.
NOTE: If you use Data Object, the object must be as an input to the Script Task.
Read more about variables in the article Variables.
- 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.