Mapping Form Field Values

In our March 2nd blog we used the workflow process to route a form for data entry. Let’s revisit that “TestFormDef” workflow definition and look at mapping a form field value to a workflow process variable.

Open the “TestFormDef” workflow definition in the designer for editing. Drag and drop a “getFormFieldValues” step into the designer and connect the last step (routeform) to the new step. Mapping Test Form Definition

Next, let’s define another workflow process string variable called “lastName”. Select the “start” step and click in the “Variables” link at the bottom of its properties pane. Type “lastName” in the Add Variable field, select “String” for Type, and click the Add button.

Mapping Workflow Process String Variable

Click the Save button to save and close Variables page.

Click on the new “getformfieldvalues” step and configure the following properties:

Mapping Get Form Field Variables

Enter “variable.formID1” for the Variable that holds the form instance ID. In the Select form definition dropdown, select the form definition used in the instantiateform step. Now click the Mapping of fields to variables button:

Mapping Instantiate

Select “txtLastName” in the Form Field dropdown and enter “lastName” in the Variable Name field. Click the Save button on the popup and click the Save button in the step properties pane. When the Workflow Instance executes, the value in the “txtLastName” form field will be written to the process variable “lastName”. Let’s save the Definition and re-execute the Workflow Instance. Mapping Form Field

The rendered view of the task containing the form is shown above. For this example we will select Joe Simpson from the Name Lookup and then complete the task.

Now let’s render the executed process: Mapping Form ExecuteClick on the last step in the process to view the properties:

Mapping Form Field VariablesAs highlighted above, the variable “lastName” now contains the value entered into the “txtLastName” field within the form.


You may also be interested in reading more on the subject of Configuring a Custom Workflow Step.

A small sampling of the Workflow Technology for BPM Solutions contained within our cDevWorkflow product offering can be found here: Workflow Technology That Works.

Learn more about our Process Automation & IT, QA Services or Software Development products and solutions on the Web!  Visit us at: Innovative Process Solutions