TABLE OF CONTENTS
- Add the Set Field Value component to a process
- How to set values to multiple form field in the same Script Task
- Valid combinations from a field to another field
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 Components section in the left panel of Process Studio.
- 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 Components 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.
Valid combinations from a field to another field
Note: When setting a value from a field to another field, these are currently the valid combinations.
All the fields of the same type can be combined eg. FileUpload to FileUpload.
The (x) shows the valid combinations that do not have the same type.
*only if referring to the same value list namespace (ID)