Description:
The GetDBFieldValue workflow step retrieves a value from a specified database table and stores the result in a Variable or Global variable.
The step supports:
- Selecting a database connection.
- Optionally connecting to a different database.
- Specifying the table from which to retrieve the value.
- Specifying the field to retrieve.
- Specifying a field used to identify the record.
- Specifying the value used to match the
Wherefield. - Storing the retrieved value in a Variable or Global variable.
- Returning a True or False result for subsequent workflow processing.
Inputs
- connectionString – The Connection string property specifies the database connection to be used by the step.
- changeDatabase – The Connect to different database property can be used to specify a different database connection target.
- fieldname – The Field name property specifies the database field whose value should be retrieved.
- tableName – The Name of the table property specifies the database table from which the value should be retrieved.
- whereFieldName –The Where field name property specifies the field used to identify the database record from which the value should be retrieved.
- whereFieldValue – The Where field value property specifies the value used together with the Where field name to identify the record.
- variableName – The Variable/Global to store the value property specifies the Variable or Global variable where the retrieved database field value is stored.
Returns
- True – The True return path can be connected to the next workflow activity when the database value retrieval operation succeeds.
- False – The False return path can be used for an alternative workflow path or error-handling logic when the operation does not produce a successful result.
Usage:
The GetDBFieldValue step is typically placed when a workflow needs to retrieve a particular value from an existing database record.
A typical workflow pattern is:
Obtain Record Identifier → Get Record Value → Use Retrieved Value
For example:
Get Customer ID → GetDBFieldValue → Process Customer Information
The retrieved value can then be used by later workflow steps to:
- Populate workflow Variables.
- Make workflow decisions.
- Retrieve related database information.
- Build messages or notifications.
- Populate form or process data.
- Perform subsequent database processing.
- Pass a database value to another workflow activity.
- Control workflow routing based on retrieved information.

Typical Workflow Suggestions:
Retrieve a Customer Value
Use the step to retrieve a particular field from a customer record.
Example:
Get Customer ID → GetDBFieldValue → Process Customer
Configuration example:
Table: Customer
Field: CustomerName
Where Field: CustomerID
Where Value: CUST-1045
Store Value: variable.varCustomerName
The retrieved customer name can then be used by subsequent workflow activities.
Retrieve a Status from a Database Record
Use GetDBFieldValue to retrieve the current status of a record.
Example:
Get Record ID → GetDBFieldValue → Evaluate Status
For example:
Table: Orders
Field: Status
Where Field: OrderID
Where Value: ORD-1045
The resulting value can be stored in a Variable and used by a subsequent decision or processing step.
Retrieve a Configuration Value
Use the step when workflow processing depends on a value stored in a database configuration table.
Example:
Start → GetDBFieldValue → Apply Configuration → Continue Process
This lets workflow behavior use database-maintained configuration information rather than hard-coding the value into the process definition.
Retrieve an Approval-Related Value
Use the step when a workflow needs to retrieve a field associated with an existing business record before continuing an approval process.
Example:
Get Request ID → GetDBFieldValue → Evaluate Request Data → Approval
The retrieved database value can be stored in a Variable and referenced by subsequent workflow activities.
Retrieve a Value Before Sending a Notification
Use the step to retrieve information that will be required when preparing a workflow notification.
Example:
Get Record Value → Prepare Notification → Send Notification
For example, the workflow could retrieve a status, customer name, request number, or other database value and make it available to the notification activity.
Use a Workflow Variable as the Record Identifier
The Where field value can be populated from a workflow Variable when the record to retrieve is determined dynamically.
Example:
Form Submission → Get Record ID → GetDBFieldValue → Process Result
This lets the same process definition retrieve values for different records across workflow instances.
Retrieve a Value from Another Database
Use the database connection properties when the required information resides in a database other than the default database.
Example:
Workflow Data → GetDBFieldValue → External Database Value → Continue Process
The XML exposes both Connection string and Connect to different database properties for this purpose.
Populate a Variable for Subsequent Activities
Use this step when a later activity requires a value that is stored in a database.
Example:
GetDBFieldValue → Store Result → Multiple Subsequent Steps
The retrieved value is stored in the configured Variable or Global variable.
Retrieve a Value for Workflow Routing
A database value can be retrieved before a subsequent workflow decision.
Example:
GetDBFieldValue → Evaluate Retrieved Value → Route Workflow
For example, a workflow could retrieve a record's status and use a later activity to determine the appropriate processing path.
Retrieve a Value Before Updating Another System
Use the step to obtain information required by a downstream integration or processing activity.
Example:
GetDBFieldValue → Prepare Integration Data → External System
The retrieved value can be stored in a Variable and supplied to the downstream activity.
Use True and False Paths
Use the two return paths to separate successful database retrieval from alternative processing.
Example:
┌── True → Continue Process
Start → Get Record Value
└── False → Handle Failure
Example:
Let’s build and execute the “getDBFieldValueDef” example.
- Create a new process definition named “getDBFieldValueDef” and open it in designer mode.
- Drag a “getDBFieldValue” step to the canvas.
- Define a variable or a global to store the result.
- Connect the dots between the “Start” and “getDBFieldValue” steps, as shown above.
- Select the line between the steps to configure the “Connection Properties”. The default property values are “None, True, False, Error, and Evaluate”. Depending on the step’s purpose, you can configure additional values.
- Click the “getDBFieldValue” step to configure its “Required” properties. Provide a name for the step, then click the Save button. Note: Click the "AI Predict" button to have the Copilot add new process steps that match your process description.

- Click the “getDBFieldValue” step to configure its “Optional” properties. Select a connection string from the drop-down list. If required, provide a different DB name (other than FlowWright); by default, the step connects to the FlowWright database. Provide the table name, field name, and SQL search condition that refers to the field name and criteria. Provide a variable or global to store the result. Click the Save button.

- The “Logging” configuration is necessary for documentation and also measures workflow progress and percent complete. Configure the step state and percent fields individually, as shown below. Configure the “Logging” using the following properties.

- Save the process definition, create a new instance, and execute it. Render the process instance and click the Get record value step to view its properties. When the workflow reaches the GetDBFieldValue step, FlowWright uses the configured database connection, table, field, and record-identification properties to retrieve the requested database value. The retrieved value is stored in the configured Variable or Global variable. The workflow can then continue through the True path or use the False path for alternative or error-handling processing.

Tips:
- Verify that the configured database connection is available before executing the workflow.
- Ensure that the specified table exists in the selected database.
- Ensure that the specified field exists in the selected table.
- Configure the Where field name and Where field value consistently so that the intended record can be identified.
- Use a workflow Variable for the Where field value when the record identifier is determined dynamically.
- Use a meaningful Variable or Global variable name for the retrieved value.
- Verify that the destination Variable or Global variable is available to downstream workflow activities.
- Test the step against representative database records.
- Test the workflow with a valid record identifier.
- Also test the workflow with an identifier for which the expected record is not available.
- Verify the retrieved Variable value after the step executes.
- Use the True path for normal downstream processing.
- Connect the False path to appropriate alternative or error-handling logic.
- Verify the selected Connection string when retrieving values from a specific database.
- If using Connect to a different database, verify that the specified database is accessible through the configured connection.
- Test database access using the same credentials and environment in which the workflow will execute.
- Avoid exposing database credentials in workflow configuration, logs, notifications, or generated output.
- Avoid logging sensitive database values unnecessarily.
- Test the workflow after changes to the database table or field structure.
- Verify downstream activities after changing the Variable used to store the retrieved value.
- Use appropriate database permissions for the workflow's database connection.
- Test the workflow with realistic data before deployment.
- Do not assume behavior for multiple matching records, null values, type conversion, or other database-specific conditions unless confirmed by the FlowWright implementation.
- Do not assume that the step supports arbitrary query syntax; the supplied XML exposes table, field, where-field, and where-value properties rather than a SQL query property.
Definition Sample:
You may download the sample definition(s) from the link provided and later import them into your FlowWright Process Definition (XML file) or Form Definition (HTML file) page, following the same approach described in the supplied SearchAndReplaceString documentation.
Note: Verify and complete any missing configuration after importing the sample, including:
- Connection string.
- Database selection.
- Table name.
- Field name.
- Where field name.
- Where field value.
- Variable or Global variable used to store the retrieved value.
- Workflow Variable references.
- Environment-specific database settings.
- Database permissions.
- Downstream True and False workflow paths.
After verifying the configuration, save the Process Definition before execution.