updateVariablesWithSQL Step
Description:
This step updates multiple variables from fields returned from the SQL result set.
Inputs
- variablesToUpdate – Assign SQL column to variables/globals
- connectionString – Select connection string
- changeDatabase – Connect to different database
- sqlStatement – SQL select statement
Returns
- True – step executed successfully
- False – step failed to execute
Usage:

Example:
Let’s build and execute the “updateVariableWithSQLDef” example.
- Create a new definition called “updateVariableWithSQLDef”
- Select the definition and click the “design” button
- Drag an “updateVariableWithSQL” step to the canvas
- Connect the dots between the Start and “updateVariableWithSQL” step
- Click the “updateVariableWithSQL” step to configure its “Settings” properties. Provide a name to the step. Click the button to assign SQL fields to variables/globals. Select the connection string from the drop-down list. Provide the SQL Select statement.

- Click the button to assign SQL fields to variables/globals. A popup window is displayed for configuration. Click the Add Row button to insert an empty row. Provide the variable name and value. Click the Save button. You may insert multiple variables and values by using the Add Row button.

- Click the “updateVariableWithSQL” step to configure its “Optional” properties. Provide a different DB name (other than FlowWright) available on the connection string. By default, the step connects to the FlowWright database.

- The “Logging” setting configuration is necessary for documentation and also measures 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 instance, and execute. Render the process instance. Click on the process step to view the properties. The step should update the variable/globals with the DB values.

Definition Sample:
You may download the ZIP file and extract the sample definition(s) from the link here. Then, you can 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 file.