Using Connections in Your App

The purpose of this article is to provide details on how connections can be implemented and utilized in your app.

This information is mentioned in the About Connections article. If you are new to connections, it is advisable to begin with that article first.

Using Connections with Records

After successfully setting up your connection and configuring its functionality with your tables, you are now ready to establish connections between your records.

It should be noted that connecting two tables together does not automatically establish connections between the records in those tables. Each record will need to be individually connected by assigning values to the respective connection fields.

Connection fields function as lookups, also known as drop-downs. This means that when you are editing a record, you have the ability to use the field to search for and connect it to the desired record(s).

Here's an example of connecting a specific Contact record to a Company record:

usingconnectionsinyourapp1

Each Company record will be available in that dropdown to connect the Contact record to.

 

Display Fields

When editing a connection field, you will find the records from the connected table displayed in a dropdown menu, showing the value from that single field. This is known as the display field, and each table has a designated display field.

To change this field, update the display field for the respective table in the table's settings. To do this, select the arrow down button to the right of the table name when the table is selected in the Data or Records tab. From there, you can adjust the Display Field setting.

In the example provided, the display field for the connection is the Company Name field.

usingconnectionsinyourapp2

 

The display field value will then appear in any connection fields that work with that table:

usingconnectionsinyourapp4
 

Note: If you find that your connection field is displaying "Undefined" instead of the connected record, you can resolve this issue by adjusting the display field of the connected table.

Simply navigate to the display field, make a change, save it, and then change it back to your desired setting. This should ensure that the connected record is displayed correctly in the original table.

 

 

Importing

You can define connections when importing new records into your app.

This can be accomplished by matching a common value during the import process. For instance, if you are importing Employee records, you can establish a connection between each Employee and a Company by utilizing a column such as "Company Name" to match against a corresponding company record and establish the connection.

 

Calculating Sums, Averages, and Formulas on Connected Records

Formula fields are special fields that run calculations on connected records and store the result.

For example, you could store the count of students connected to a class or the average sale connected to an employee.

See our article here for more on formula fields.

 

Including Connected Values in Equations

Equation fields have the capability to incorporate values from connected records. This allows you to include values from connected tables in your calculations.

When you add fields to an equation in the equation field editor, you will notice that connected records are listed in the field dropdown. Take a look at the example below, which demonstrates how Vendor fields are connected to the Line Item table, denoted as Line Items > Vendors.

Tip: See our article here for more on equations.

 

 

Connections in the Live App

Displaying Connected Records in Your Live App

An effective way to utilize connections is to display connected records in your Live App. For instance, you can showcase all contacts that are linked to a specific company:

 usingconnectionsinyourapp6

 

When you add a view on any details page, you will have the options to display these connected records.

usingconnectionsinyourapp7

Tip: See our article here for more on displaying connected records.

 

Adding Connected Records with Forms

Similar to the example above, you can also add a form view to add a connected record. When you add a new record with a form, that connection is automatically set based on the parent record being viewed.

 

Combining Connected Records in Views

When displaying records in a view (like a grid or list), you have the ability to incorporate fields from other connected records.

Connected tables will be displayed in the "Add Columns" section under "Connections". You can select fields from the connected table from there to add to your record view. 

usingconnectionsinyourapp8

 

Using Dynamic Dropdowns in Forms

You have the ability to utilize connections between two tables in order to create dynamic drop-down lists. For example, you can set up a country selection that will automatically update the available states/provinces connected to that specific country.

To utilize both connections on your form, you can set the second connection to utilize the first. Simply hover over the connection input in the form and select the edit pen icon.

connections10

 

Tip:  You can learn more about using dynamic dropdowns in your forms in our article here.

 

 

Linking to Connected Views

To display connection field values as links for viewing more details about each connected record, you will need to have a page that can display the record details. Edit the view and click on the connection field to update the following options:

  • Connection Separator: Determines how each value in the connection field will display. Options include Comma-separated or New Lines.

  • Connection Link: Allows you to choose an existing page for the table the connection links to. Adding a link will make each value its own separate link to view more information about that record.

In the following example, the Company column has the Connection Link set to a company details page so each company can be clicked to view more details:

 
image alt text