Description:
This step is used to set the form field values
Inputs
- formInstanceID – Variable that holds the form instance ID
- fieldMappings – Mapping of values to fields
- formID -- Select Form Definition
Returns
- True – step executed successfully
- False – step failed to execute
Usage:
Example:
Let’s build and execute the “setFormFieldValuesDef” example.
- Create a new Form Definition called “setFormFieldValuesDef,” the design layout is below.
- Create a new process definition called “setFormFieldValuesDef”
- Select the definition and click the “design” button
- Drag the “instantiateForm, setFormfieldvalues, and routeForm” steps from the toolbox
- Connect the dots between the Start and the other steps as above
- Click the “instantiateForm” step to configure its “Settings” properties. Provide a step name. Select the Form Definition from the drop-down list. Provide a variable/global reference to hold the Form Instance ID. Click the Save button.
- Click the “setFormFieldValues” step to configure its “Settings” properties. Provide the variable/global reference that holds the Form Instance ID. Select the Form Definition from the drop-down list.
- Click the button to map the Form fields with values. Click the Add Row (+) button to insert an empty row. Select the form field from the drop-down list. Provide the field value in the text box. Click the Save button. You may initialize multiple form fields by adding more rows.
- Click the “routeForm” step to configure its “Settings” properties. Provide the step name and description. Select the Form Definition from the drop-down list. Provide the variable/global reference that holds the Form Instance ID. Click the Save button. Configure the “RouteTo” field in the Advanced tab.
- Save the process definition, create a new process instance, and execute. Render the process instance. The process is sleeping at the RouteForm step as below.
- Navigate to the Tasks page. Select the form task to render on the new page.
- The form is rendered with the values initialized by the “setFormFieldValues” step during the process execution as below.
Definition Sample:
You may download the sample definition(s) from the link here and later import it (drag-drop) to your FlowWright Process Definition (XML file) or Form Definition (HTML file) page.
NOTE: Please verify and complete the process steps for any missing configurations, such as file path references and database connections after import. Then, save the definition to confirm the changes.
Click here to download the sample Process file.
Click here to download the sample Form file.