Clear Field Value is a Script Component that automatically clears a Data Object form field in your process model.
This is useful for example if a field value (such as a cost suggestion) has been filled in and later rejected and the data object has been sent back in a loop in order to receive a completely new value for that form field. It might then be preferable if the old rejected form field value was cleared allowing for fresh new input.
Add the Clear Field Value component to a process
- Open the Component section in the left panel of the modeller
- Drag and drop the component Clear Field Value onto your canvas or onto an already existing script component of any type if you want to stack several scripts in one task.Close the configuration window and connect the Script Task to your other symbols as well as to any Form Templates and Data Objects (as output) you want to Clear Field Values in.
- Open the script task settings and click on Configure scripts to open the configuration view .
- Choose what form field you would like to clear. A drop down list will be shown containing all fields available for clearing in the connected form.
NOTE: the connected Form Template or Data Object must be an output to the Script Task in order to Clear Field Value. Furthermore, only one output connection is allowed per script task.
Click on Save.
How to clear multiple fields in the same Script Task
If you want to clear more than one field in that specific form, simply drag and drop one or more additional Script Component from the Component section in the Asset Browser onto your existing Script Task and configure your second script component. All added components will be accessible from the left side menu in the Configure Script setting. Note that a script component can only ever have one output data object connected to it which means that if you'd like to clear fields in several different forms, a new script task is required for each new form.
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. Note however that a script task can only ever be a script task and that any functionality the task originally had will not be available.