Checks the DB rows are available

Use this step to check the DB rows are available

Last published at: February 17th, 2025

hasDBRows Step

Description:

This step checks if DB rows are available. 

 

Inputs

  • connectionString– Connection
  • changeDatabase-- Connect to different database description 
  • sqlStatement– SQL statement multiline
  • variableName – Variable/Global to store the record count
  • commandTimeOut – Command timeout value 
 

 

Returns

  • True – step executed successfully
  • False – step failed to execute 
 

 

Usage:

 

 

Example:

Let’s build and execute the “hasDBRowsDef” example.          

  • Create a new process definition called “hasDBRowsDef” and open the definition in designer mode. 
  • Drag a “hasDBRows” step to the canvas. 
  • Define a variable or a global to store the result.
  • Connect the dots between the “Start” step and “hasDBRows” steps, as shown above. 
  • Click the “hasDBRows” step to configure its “Required” properties. Provide a name for the step. Select the connection string from the drop-down list. Provide a SQL SELECT statement query.  Click the Save button. Note: Click the "AI Predict" button for the Copilot to add new process steps that match your process description. 

 

  • Click the “hasDBRows” step to configure its “Optional” properties. If required, provide a different DB name (other than FlowWright); by default, the step connects to the FlowWright database. Provide a variable or global reference to store the result. Provide the time-out value (in seconds). Click the Save button. 

 

  • The “Logging” setting configuration is necessary for documentation and to measure workflow progress and the percentage 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 then execute it. Render the process instance. Click the process step to view its properties. The step should check whether database rows are available. Render the process instance to view the result stored in the variable or global.

 

Definition Sample:

You may download the sample definition(s) from the link here and later import them (drag-and-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.