Collections
Overview
Collections in Hypertable are like tables in a database. Collections contain Fields and Records. Records are the rows of data in the database, and the Fields in the Collection define the way data is stored in the Records in the same Collection. To store any data in Hypertable, you first need a Collection to store it in.
Contents
- Collection Settings
- Collection Fields
- Creating Collections
- Editing Collections
- Deleting Collections
- Remote Collections
- Importing CSV Data
- Record Triggers
- Record Actions
Collection Settings
Name & Description
Collections have a name and an optional description. The name should be a short identifier, while the description can contain a longer description of what the Collection represents to help users keep track of what is going on in the Project. The Collection name is used throughout Hypertable to identify the Collection in the interface.
For example:
- Name: "Orders"
- Description: "Orders for our product/service from customers"
Title Field
The Title Field of a Collection specifies which Field in the Collection should be used for the Record's "title". Record titles are used whenever a single identifying label is required (for example when selecting Records from a dropdown list), and also for Searching.
Optional Settings
- Default Colour Field - specify a Colour or Select Field to use as the default Field specifying how to apply a colour to a Record in places where this is an option. Examples include:
- The Record colour setting in List Views
- The Record colour setting in Kanban Views
- Default Collection View - specify a default "Collection" View to use when opening this Collection in a "Collection" View - for more information see Default Views
- Default Record View - specify a default "Record" View to use when opening a single Record in this Collection - for more information see Default Views
Collection Fields
Fields define what data can be stored in each Record in the Collection. Some Field types to no store data directly, but enable some other functionality (like Button fields). For more information, see the Fields page.
Creating Collections
In an existing Project, open the Project settings page, then select the Collections tab. Click the Create Collection button, then select one of the options:
- Create new collection - create a new Collection containing only the default Fields
- Create from template - create a new Collection from an uploaded Collection template file
- Create remote collection - create a new Remote Collection
Follow the instructions that are displayed after selecting one of the options to create the new Collection.
Editing Collections
To edit an existing Collection, open the Project settings page, then select the Collections tab. Next, click the Edit button for the Collection that should be edited.
The Edit Collection modal is displayed, with tabs for editing all the settings in the Collection:
- Collection Info - edit the settings for identifying the Collection as well as default Field and View settings
- Fields - create, edit, reorder, and delete the Fields in the Collection
- Triggers & Actions - add, edit, and remove Record Triggers and Record Actions
For more options, click the button in the top-right corner of the modal.
Deleting Collections
Note: Deleting a Collection cannot be undone. Deleting a Collection also deletes all the Records in the Collection.
To delete a Collection, open the Project settings page, then select the Collections tab. Next, click the button for the Collection that should be deleted, then select Delete Collection.
The "Delete Collection" modal is displayed, with a warning that the action is irreversible. To confirm that the Collection should be deleted, enter the name of the Collection as displayed in the modal into the confirmation box, then click the Delete button.
Remote Collections
Remote Collections enable Projects to reference data contained in other Projects within the same Workspace. Remote Collections cannot reference data in other Workspaces.
Remote Collections provide a "read only" view of the data in the source Collection, therefore not data in Remote Collections can be edited. For this reason, if it is desired to create references from Records in the current Project to Records in a Remote Collection, only Reference Fields may be used, and Join Fields may not.
Creating Remote Collections
To create a Remote Collection, select the Create remote collection option when creating a Collection. A modal is displayed where the target Project in the same Workspace can be selected, then the target Collection in the selected Project. Click the Create button to confirm creation of the Remote Collection.
Updating Remote Collections
If the definition of the original Collection that the Remote Collection references is updated, the Remote Collection must be synchonised. Open the list of Collections in the current Project, then click the button for the Remote Collection, then select Synchronise with remote.
Deleting Remote Collections
Open the list of Collections in the current Project, then click the button for the Remote Collection. Next, select Delete Collection and confirm the deletion.
Importing CSV Data
Docs coming soon!
Record Triggers
Record Triggers enable Custom Functions to be executed in response to certain Record events. Record Triggers are similar to View Triggers. There are three Record events to trigger a Custom Function:
- On create Record - this event occurs when a new Record is created in the Collection. The newly-created record is available in the Custom Function's context
- On update Record - this event occurs whenever the Field values of a Record is updated. Both the previous and updated values of the Record are available in the Custom Function's context
- On delete Record - this event occurs when a Record is deleted. The value of the Record before it was deleted is available in the Custom Function's context
Any Custom Function can be executed after a Record event Triggers. Please see the Custom Functions page for more information about Custom Function context.
To edit the Record Triggers for a Collection, open the Project settings page, then select the Collections tab. Next, click the Edit button for the target Collection, then select the "Triggers & Actions" tab. Select the Custom Function to execute in the dropdown associated with the target Record event, then Save the settings.
Record Actions
Record Actions let users run Custom Functions in the context of a selected Record. This can be useful to create custom steps in a workflow where using a Button field is inappropriate or not possible. Record Actions are similar to View Actions.
The Custom Function will have the current Record available in its context when it is executed. A Record Action can execute any Custom Function in the Project.
To edit the Record Actions for a Collection, open the Project settings page, then select the Collections tab. Next, click the Edit button for the target Collection, then select the "Triggers & Actions" tab.
Click the Add Action button to add a new Action, then edit the label and select the Custom Function that should be executed. Actions can be reordered by dragging them with the handle. Remove Actions by clicking the button. Click Save to confirm the new settings.
Do you think something is missing from the docs? Let us know