Read Customer Stories
Digitization boosts DeRock Electric’s operations, efficiency, and profitability.
Built a a HIPAA-Compliant Start-Up and saved $250k+ saved/year.
Try Interactive Demo
No-code database platforms are transforming the way web apps are…
Template Marketplace
Supercharge your Work Order Management by managing work orders, assigning…
Supercharge your Work Order Management by managing work orders, assigning…

Knack Tip: Where to Add a Connection & How Many to Add

Related Posts

Hey everyone, it’s Danielle from Knack with a quick Knack tip. Today I want to talk about adding connection fields to your app—both where to add them and how many you need between objects.

As you start building your app, you’ll likely be adding multiple objects and user roles. Eventually, you’ll want those objects to work together, and that’s when connection fields come into play.

Before diving into the example, let’s cover the basics. What is a connection?

Connections are one of the most powerful features in Knack. They allow you to build relationships between objects by adding a connection field that links records from one object to another. For example, you may want to connect jobs and applications, so each application can be linked to a specific job.

How Many Connection Fields Do You Need?

You only need one connection field to link two objects. In our example, we have a Jobs object and an Applications object. A single connection field between them is enough.

In this case, we’ve placed a Jobs connection field on the Applications object, meaning each application connects to one job, and each job can connect to many applications.

Where to Place the Connection Field

So if you only need one connection field, where do you put it?

It depends on the type of connection. The most common type is one-to-many. If you’re working with a one-to-many connection, the field should be placed on the many side—typically referred to as the child object.

In our example:

  • Jobs = parent object
  • Applications = child object
  • Each job has many applications

So the connection field goes on the Applications object. A good way to remember this: a single parent may have many children reaching out to it.

Viewing the Connection in Action

Looking at the records, the job connection field in an application record links back to a single job—like “Customer Success.” You can switch this to “Company Lawyer” or any other job. That dropdown is what makes the connection between the two objects.

Let’s switch it back to Customer Success.

Why Add the Connection to the Many Side

You want to place the connection field on the many side because:

  1. It’s usually the side that gets edited more often
  2. You likely already have the parent record created

For example, in the live app, we have a form for adding an application. The Jobs connection field appears as a dropdown that lets you select one job. Because multiple applications can link to one job, this form can be submitted many times, each connecting to the same job.

What Happens If You Add the Connection Field to the One Side

Let’s flip things around. What if you add the connection field on the one side, the Jobs object?

Just to show you, I’ll add a new connection field connecting Jobs to Applications. We’ll again define it as a one-to-many relationship:

  • Each job connects to many applications
  • Each application connects to one job

Now I’ll add that new field to the form and save the changes. Let’s refresh the app.

Now we’re viewing a one-to-many relationship with the connection field placed on the parent object. What this means is the Jobs object now contains a field that shows related application records.

Here’s the problem: this isn’t a best practice. Usually, you create the job listing (parent) first, then add applications (child) after. If the editable connection field is on the parent side, you won’t be able to assign that relationship directly from the child object.

What About One-to-One and Many-to-Many?

So far, we’ve focused on one-to-many connections. But what if you’re dealing with a one-to-one or many-to-many relationship?

The recommendation: add the connection field to whichever object you’ll be editing more.

For a one-to-one connection:

  • You only need one connection field
  • Add it to the object where edits are most likely to happen
  • It will behave like a dropdown to select one linked record

For a many-to-many connection:

  • Add the field to the object that’s edited more frequently
  • It will appear as a dropdown or multi-select where you can link multiple records

Final Thoughts

I hope this gives you a helpful overview of how many connection fields you need and where to place them based on the connection type.

Talk to you soon, and happy building.