Views

Views

Views

Views allow you to view and edit your database data in a more user friendly way.

Creating a view

Views must be created within teams. When creating a view, you will be prompted to select which database table to use as the Source for your view. Once you’ve selected your source table, you will enter the view editor, where you can do things such as:

  • Show/hide/reorder attributes
  • Specify sorts and filters
  • Edit the name and emoji
  • Pick the layout in which the data should be presented
image

Layouts

  • List (Default)
  • image
  • Card
  • image
  • Table
  • image
  • Form Used to create new records on the Source table
  • image

Join tables

If the source table used on the view has foreign key columns, then it’s possible to join the base table with other tables that correspond to the foreign key columns.

Show/hide attributes

Every attribute (i.e. table column) can either be visible or hidden. You can also specify a different set of attributes from one layout to another in order to be able to show different attributes for different layouts.

Slack notifications

You are able to enable Slack notifications on a view. When enabling Slack notifications, you must specify a “created at” date column that is used to determine if new records have been created. You can select the frequency at which slack notifications appear (daily, hourly, real-time). Note the real-time option concretely means that a check is done once every 5 minutes.

image
image

View relations

View relations can be used to show records that are related to a record on a different view. For example, an ecommerce application might have an Orders view and another view that contains individual items that make up an order called Order Items. By setting up a view relation between the Orders view and Order Items views, it’s possible to load all the items related to an order right from the Orders view.

Setup a view relation

To setup a view relation, edit a view and navigate to the Data tab.

image

When adding a new view relation, you must choose the view and attributes that are related to each other.

image
💡
You can only relate attributes that have the same database column types. For example, it is possible to relate an integer attribute to another integer attribute, but you cannot relate and integer attribute to a varchar/text attribute.

Loading related records

Loading related records is done in the side panel for a view. Records are loaded automatically if the records were last loaded over 30 minutes ago. If there is an error loading records for a view relation, the record will need to be refetched manually using the refresh button since the app will not retry loading the records automatically.

image

Display values

Related records will display the first two list layout attributes for the related view. It will also display a display image for the record if it exists on the related view.

image

Nested view relations

It’s possible to click on a related record to view more details on the related record, including any further relations that might be associated with the related record. For example, there could be view relations setup that relate an Orders view to an Order Items view which related to a Products view. That way you would be able to see all the order items related to an order as well as see which product is related to an order item.

image
💠
https://www.basedash.com

© BaseDash Inc.