Include related information in the same result instead of adding a separate lookup for each record in a list.
Suppose your Orders table stores a customerId, and your Customers table contains the corresponding customer record.
Add Get Multiple Data and select Orders.
Set the filters and record limit you need.
Open the command's Output tab.
Under Related records, add a relationship.
Select Customers as the related table.
Match customerId in Orders to _id in Customers.
Set Include as to customer.
Choose one related record.
Save and test.
Each returned order now includes its matching customer under customer.
Here is the first order from a sample result. Its related customer, Ada, appears inside customer. This example uses customerId as the matching field in Orders.

Choose one when you expect a single match, such as an order's customer. Choose list when there may be several matches, such as all items belonging to an order.
This settings example uses the same matching fields and shows List of related records. Select the one-record option for the customer example above.

Use an output name that does not overwrite an existing field. Ensure matching fields contain compatible values. Relationships look up matching records; they do not automatically create a relationship or repair inconsistent IDs.
Set an appropriate record limit and choose only the fields your app needs under Fields to return. Large lists with many related records can exceed the allowed result size.

Index frequently used matching fields to keep lookups efficient. See Database Indexes.
Table Relationships
In Twidget, you can connect database table data using the `_id` field that is automatically generated for every row in a table. This `_id` field is essential for creating and maintaining relationships across different tables. Types of Relationships. A one-to-one relationship occurs when a single row...
Database Basics
Twidget offers a comprehensive database solution for all workspaces. Here's an overview of how databases are structured and managed within Twidget: Database Structure. 1. Tables: A database may contain multiple tables. Each table stores data in a structured format. 2. Fields: Tables consist of field...
Database Storage
Managing your database storage effectively is crucial for ensuring optimal performance and cost-efficiency when using Twidget. Each entry within your database table utilizes a certain amount of storage space. Twidget provides intuitive tools to help you monitor and manage this storage. Viewing Datab...
Export Data from Tables
Twidget allows you to export data from your database tables to a CSV file. This feature supports the export of both complete and filtered datasets. Here’s how you can utilize this functionality: Features. - Format: Export data in CSV format. - Data Handling: Object and list data types within your ta...
Database Change Triggers
Run an event automatically when a record is created, updated or deleted in a Twidget table. For example, send a welcome message after adding a customer, or refresh a summary when an order changes. Prepare the event. Create an event containing the steps you want to run. Add an Object input named `tri...