TABLE OF CONTENTS

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 Components section in the left panel of Process Studio.

  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.

    Note
    : 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 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.



To
FromHTML editor Textarea Textfield
Datefield xxx
HTML editor x
Numberfield xxx
Numericfield xxx
Textarea xxx
Textfield xxx
Timefieldxxx



To
FromValue List
(single)
Value List
(multi)
Extended value list (single)Extended value list (multi)
Value List (single)xx*x*x*
Value List (multi)
x
x*
Extended value list (single)x*x*xx*
Extended value list (multi)

x*

x


*only if referring to the same value list namespace (ID)