This step updates a given database row and column with a new value.
- connectionString – connection string to the database
- tableName – name of the database table
- changeDatabase – connect to different database
- fieldName – name of the field to update
- fieldValue – value to update
- whereFieldName – name of the where clause field
- whereFieldValue – value of the where clause field
- True – step executed successfully
- False – step failed to execute
Let’s build and execute the “updateDBFieldValueDef” example.
- Create a new definition called “updateDBFieldValueDef”
- Select the definition and click the “design” button
- Drag an “updateDBFieldValue” step to the canvas
- Connect the dots between the start and updateDBFieldValue steps
- Click on the “updateDBFieldValue” step to configure its “Settings” properties. Provide a name to the step. Select the connection string from the drop down list. Provide a table name. Provide the field name and the new value. Define the SQL search condition referring the field name and the criteria.
- Click on the “updateDBFieldValue” step to configure its “Advanced” properties. Provide a different DB name (other than FlowWright) if required and by default, the step connects to the FlowWright database.
- The “Logging” setting configuration is necessary for documentation and also measure the workflow progress and the percent complete. This is achieved by configuring the step state and percent fields individually as shown in the images below. Configure the “Logging” using the following properties.
- Save the process definition, create a new process instance and execute. Render the process instance. Click on the process step to view the properties. The step should update the DB field.