Skip to content

Configure Database Operation

There are 2 types of Database Operations,

Database operations created in the (form editor) by clicking (Properties button) can only be used for form field related actions.

Database operations created in the (Flow Designer) by clicking (Properties button) can only be used in (Database Component) when designing the flow.

Any database operation is performed on one or more of WorkHub24 data tables. So, as a pre-requisite make sure required data tables are created.

Click on the Properties button at the top right corner

Step 2: Add the DB Operation by Giving a name

Section titled “Step 2: Add the DB Operation by Giving a name”

Click on DATABASE tab, type name and press ‘Add’ button.

Select from the 3 options available if it’s a Form based DB operation

  1. Create a new record
  2. Read from table(s) (you can read from multiple data tables at once - similar JOIN query like in SQL)
  3. Update a record

Select from the 4 options available if it’s a Flow based DB operation

  1. Create a new record
  2. Read from table(s) (you can read from multiple data tables at once - similar JOIN query like in SQL)
  3. Update a record
  4. Delete a record

Select a table from the dropdown menu given

Step 5: Assign a Record ID (Only valid for CREATE operation)

Section titled “Step 5: Assign a Record ID (Only valid for CREATE operation)”

Go to variables and create a number type variable. Assign this variable to store the ‘record id’ created when inserting the new record to the table.

Create a Variable like this in VARIABLES tab

Step 6: Configure the Filter Criteria (Only valid for UPDATE, READ & DELETE operations)

Section titled “Step 6: Configure the Filter Criteria (Only valid for UPDATE, READ & DELETE operations)”

This filters the records from the table that will be affected by this operation. It’ similar to a WHERE clause in SQL.

Filter the records

You can add multiple filtering rules. Then all the rules will be considered when selecting records from the data table.

Data table field you specify in the left hand side is compared according to the operator you select in the middle with the value you select on the right hand side. When selecting a value, you have 4 options,

Filter Options for the Value

  1. Type a static value
  2. Select a value of a form field
  3. Take value from a form variable
  4. Take value from a flow variable

Step 7: Field Mapping (Only Valid for CREATE & UPDATE operations)

Section titled “Step 7: Field Mapping (Only Valid for CREATE & UPDATE operations)”

CRETE & UPDATE database operations update one or more columns of a data table. Field mapping is about deciding which values get written to the respective data table columns. These values may come from,

  • Form fields
  • Flow variables (a variable defined in the ‘Flow Designer’)
  • User can type a value

Field Mapping Example of a Database Create Operation

Step 8: Result Mapping (Only Valid for READ operations)

Section titled “Step 8: Result Mapping (Only Valid for READ operations)”

READ operation reads information from one or more Data tables (identified as Source).
Information read from the tables is saved to the destination. This is called ‘Result Mapping’.
Destination differs based on the type of operation.

  • If it’s a Form based Database READ Operation,

Destination can be a,

  1. Form field or a
  2. Form variable

as shown below,

  • If it’s a Flow based Database READ Operation,

Destination can only be a Flow variable as shown below.