updateVariablesWithSQL Step

Use this step to update multiple variables from SQL result set.

Last published at: August 30th, 2023

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 on the “updateVariableWithSQL” step to configure its “Settings” properties. Provide a name to the step. Click on the button to assign SQL fields to variables/globals. Select the connection string from the drop down list. Provide the SQL Select statement. 
  • Click on the button to assign SQL fields to variables/globals. Click on (+) Add Row to map SQL column names with variables/globals. 
  • Click on the “updateVariableWithSQL” 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 variable/globals with the DB values.