Premium Checkbox Feature
Usage of the Database premium feature set requires account access to be granted. Please contact your Checkbox Customer Success Manager for more details.
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
- 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
- For the create function, current App variables need to be mapped to the corresponding Database fields so that the data can flow correctly
- "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
- For the retrieve function, you can retrieve all entries or 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
- Limitations:
- User variables and file upload fields cannot be retrieved
- Retrieving all entries matching will return a list variable
- For the retrieve function, Database fields need to be introduced as new variables in the current App so that the data can flow correctly
- Limitations:
Update
- For the update function, current App variables need to be mapped to the corresponding Database fields so that the data can flow correctly
- 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
- Drag in a DATABASE block
- Using the "Select Database" dropdown, select the Database you wish to create an entry to from your App
- Using the next "Database Function" dropdown, select "Create"
- 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
- Confirm/Change the "Return ID"
- Click "SAVE" once completed
How to retrieve data via the Database Connector
- Drag in a DATABASE block
- Using the "Select Database" dropdown, select the Database you wish to create an entry to from your App
- Using the next "Database Function" dropdown, select "Retrieve"
- 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)
- Select either "Retrieve all entries" or "Retrieve last created entry only" or "Retrieve all matching entries" from the radio buttons based on the filter set in step 4
- In the "Current App" variable column, enter unique variable names that will correspond to the appropriate variables in the selected Database
- Click "SAVE" once completed
How to update a data entry via the Database Connector
- Drag in a DATABASE block
- Using the "Select Database" dropdown, select the Database you wish to create an entry to from your App
- Using the next "Database Function" dropdown, select "Update"
- 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)
- Select either "Upload last created entry only" or "Upload all matching entries" from the radio buttons based on the filter set in step 4
- 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
- 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.
Can end users lookup a Database in a FORM block?
Yes they can - for details on how to do this, please see the article on Lookup Fields on FORM blocks.