Connecting Related Data

Here you will learn about connecting your data and creating meaningful and useful relationships to tie your records together. This will unlock powerful features that tell the true story of your data.

This article covers the following topics:



Think about the data you want to organize. Odds are that you’re thinking about more than just individual records.

You’re also thinking about the relationships that tie those records together. It’s those relationships that give your data meaning and make it useful.

In other words, customer data isn’t just about individual customers. It’s also about what each customer orders, and the items related to each order. 

Project data isn’t just about projects, but also about which employees work on each project and their related project assignments. Inventory​ data isn’t just about inventory, but also about how shipping and receiving affect inventory levels.

We call these relationships connections. When you define connections in Knack, you’re mapping your Knack data with how it works in the real world.

Those relationships unlock powerful features that can tell the true story of your data.

For example, with connections you can:

  •  View related data: You can create relationships between your data so that when you view information about a company, you can also view information about all of the contacts that are associated with that company as well.

  •  Ensure users only have access to their own data: Limit the data that users see on a page so that they only see the data that is relevant to themselves. This way, customers only see the orders they have created once they log in.

  •  Run calculations and visually summarize your data: Create reports that show the total sales made in a given month and even how much each salesperson contributed to that total.


How do connections work in Knack?

In Knack, connections are represented as a special field type. Connection fields allow you to create relationships between tables storing different data types within your app.

If you have used other database solutions, you may have used primary and foreign keys, links, or joins to create relationships. 

One common example is connecting Employee and Company data. When many Employees work at a single Company, this data is related.

To show this relationship in your app, you can add a connection between the Employees table and the Company table. 

Here are some other examples of related data that use connections: 

  • Assigning Managers to specific Locations

  • Showing Orders related to a single Customer

  • Enrolling Students in specific Classes 

Tip: To learn more about connections, see our article About Connections here


What can you do with connections?

View Related Data

You have the ability to visually display connected data while constructing your views and pages. This provides a hierarchical view by incorporating views that display connected data on a page showcasing the details of a single record.

By implementing a hierarchy, users can delve deeper and examine the intricacies of a record alongside other relevant data. Additionally, you can visually reference connected data directly within a view by selecting which connected fields you wish to share on a page.

A typical example is displaying contacts linked to an individual company. By establishing connections between your contacts and company records, you have the ability to create a comprehensive record profile for a company.

As an illustration, let's take a look at the profile of the Company "BASCO" to see the contacts associated with that company.




From the detailed company profile, users can take an additional step and access the profile of an individual contact. By viewing the contact profile, users can easily see any connected notes that have been added.



Another example is to display the connected company data directly in a grid that lists contact records.


Other examples:

  • View a detailed profile for a Project record showing connected Tasks, Milestones, and assigned Employees.

  • View a detailed profile for a Campaign to see connected Donations.

  • View a detailed profile of an Event to see connected Registrations.

See related articles below to learn more:


Ensuring Users Only Have Access to Their Data 

With connections, you can ensure that users have access only to their own data. This enables users to securely log in and view records that they have permission to see.

​Here are some common examples:

  • Assigning project managers to specific projects. These managers can then login and only see records for the projects they are assigned to.

  • Enrolling students in specific classes. Students can then login and see their connected classes.



Add Workflow and Run Calculations 

Automatically Connect or Update Records with Forms

Connections provide the capability to automate your app by creating or updating connected records when forms are submitted. For instance, if a form updates a record for a "Job Application" as hired, you can automatically update the connected "Job Posting" record to indicate that the job search is closed.



See related articles below to learn more:


Share and Combine Connected Data in Records 

In Knack, you have the ability to share and combine connected data directly within records. This is achieved by utilizing special field types such as text formulas, equations, and formulas.

For instance, in the field that connects Contacts to Companies, you can showcase the name and phone number of each associated Company record.



Run Calculations with Connected Data

Furthermore, it is possible to utilize connected values in calculations directly within a record by employing equations and formula fields.

As an illustration, in our Purchase Orders app, a formula field is utilized to automatically calculate the "Order Total" by summing up the subtotals of all connected Line Items records associated with each Order record.


​See related articles below to learn more:


How have others used connections?

Connections have been a game-changer for numerous Knack customers, enabling them to bid farewell to the arduous task of managing spreadsheets, spending hours on manual data entry, and dealing with constant uncertainty regarding data accuracy. RC Recycling is a prime example of this.

Mike Richards used to spend two hours each day manually transferring data between multiple spreadsheets in order to manage his recycling projects, containers, drivers, and more. However, by utilizing connections to establish the necessary relationships, Mike was able to develop automated workflows that streamlined operations and improved efficiency.

Now, Mike is constantly aware of the status of his assets, and drivers have complete clarity on their assignments. Customer management flows seamlessly, allowing Mike's data to work in his favor rather than against him.

You can read the full case study here.