DATABASE Block

Beta Feature

As of now, the DATABASE block feature is currently only available as a beta version on a limited number of accounts. Usage of this feature requires you to be an Enterprise customer. For queries related to your licence agreement, ask your account administrator to contact your Checkbox Account Manager.

 

What is a DATABASE block?

The DATABASE block is a backend block that allows data to flow between Apps and Databases. Authors can configure the block to either create, update or retrieve data from a connected Database during end user run-time.

An example use case where you might use a Database and DATABASE block is if you have a HR Solution with an employee onboarding App and employee performance review App. In this case, employee data can be captured from the employee onboarding App and stored in a Database. Once stored, you can use the DATABASE block to reuse and prefill the same data into the employee performance review App. Creating new and updating existing employee data in the Database is also possible from the employee performance review App via the DATABASE block.

 

Notable components of the DATABASE block

General

  1. Not all Database fields need to be mapped/introduced as new variables for the current App (i.e., fields can be left empty as not all fields may be required for creating/updating/retrieving to and from the Database respectively)

Create

  1. For the create function, current App variables need to be mapped to the corresponding Database fields so that the data can flow correctly

  2. "Return ID" in the create function is the uuid of an entry in the Database that you can use to selectively target this entry when using retrieve or update functions in the DATABASE block

Retrieve

  1. For the retrieve function, you can filter the entries you read from the Database by matching a current App variable to a Database field and choosing whether to read the last matching entry or all matching entries
    1. Limitations:
      1. User variables and file upload fields cannot be retrieved
      2. Retrieving all entries matching will return a list variable

    2. For the retrieve function, Database fields need to be introduced as new variables in the current App so that the data can flow correctly

Update

  1. For the update function, current App variables need to be mapped to the corresponding Database fields so that the data can flow correctly

  2. For the update function, you can filter the entries you update to the Database by matching a current App variable to a Database field and choosing whether to update the last matching entry or all matching entries

 

How to create a data entry via the Database Connector

  1. Drag in a DATABASE block

  2. Using the "Select Database" dropdown, select the Database you wish to create an entry to from your App

  3. Using the next "Database Function" dropdown, select "Create"

  4. In the "Current App" variable column, map the appropriate variables in the current App to the Database fields where you wish to store the end user data

  5. Confirm/Change the "Return ID"

  6. Click "SAVE" once completed

 

How to retrieve data via the Database Connector

  1. Drag in a DATABASE block

  2. Using the "Select Database" dropdown, select the Database you wish to create an entry to from your App

  3. Using the next "Database Function" dropdown, select "Retrieve"

  4. Filter the entries in the Database you wish to retrieve data from by selecting the Database field using the "Target database field" dropdown and the current App variable using the "Value" dropdown (i.e. when the 2 values held in each variable match, it will trigger the retrieve function from the Database)

  5. Select either "Retrieve last created entry only" or "Retrieve all matching entries" from the radio buttons based on the filter set in step 4

  6. In the "Current App" variable column, enter unique variable names that will correspond to the appropriate variables in the selected Database

  7. Click "SAVE" once completed

 

How to update a data entry via the Database Connector

  1. Drag in a DATABASE block

  2. Using the "Select Database" dropdown, select the Database you wish to create an entry to from your App

  3. Using the next "Database Function" dropdown, select "Update"

  4. Filter the entries in the Database you wish to update data for by selecting the Database variable using the "Target database field" dropdown and the current App variable using the "Value" dropdown (i.e. when the 2 values held in each variable match, it will trigger the update function to the Database)

  5. Select either "Upload last created entry only" or "Upload all matching entries" from the radio buttons based on the filter set in step 4

  6. In the "Current App" variable column, map the appropriate variables in the current App to the Database fields where you wish to update existing data

  7. Click "SAVE" once completed

 

Is there a limitation on which Database I can connect my App to?

Yes. The DATABASE block will only show the available Databases that have given access to the corresponding Solution.

 

Is there a limitation on how many DATABASE blocks I can have in an App?

No. There is no limit to the amount of DATABASE blocks you can have in your App and you can connect to as many Databases as you possibly can as long as it has given permission for access for the corresponding Solution.