Table of Contents

Connections: Troubleshooting & FAQs

Lesley Updated by Lesley

Do I need to add a connection field to both of the tables I want to connect together?

No, you only need one connection field to make a connection between two tables. While double connections can be used in rare cases, adding a connection field to both tables can make it difficult to navigate continuing to build and manage your app. 

Which table should I add the connection to?

For one-to-many connections, it generally works best to add the connection to the many, or "child" table.

For many-to-many, add the connection to the table that you want to select the connected record from in the Live App. For example, you may have a many-many relationship between Projects and Managers. Which record do you want to edit to connect to the other record? If you want to be able to add Managers to Projects from the Project details page, add the connection field to the Projects table.

See this article about connection types for more details

Do I need to track unique ID or key fields?

No, Knack manages all the connections behind the scenes without needing key or ID fields.

If I delete a parent record will all the connected child records also be deleted?

No, when deleting a parent record the child records will not be deleted.

How do I delete a connection?

Use caution when deleting connection fields. These are foundational elements of your app and can corrupt pages, views or records which previously used this deleted connection. 

From the Data section in the Builder, select the table whose connection you would like to delete. Locate the connection field among your list of fields, hover your mouse over it the more (...) icon, and click the “Delete” option in the dropdown.

My connection field shows as undefined.

A record in one table is connected, but the connection field shows "Undefined" instead of the connected record. 

To fix this, go to the settings tab of your connected table, in the Data section of the Builder. Change the Display Field, save, and change the Display Field back to what you want. 

You will now see the connected record display properly in the original table. 

How can I change what field from my connection table displays in the connection field?

You can customize what field from a connected table shows in a connection field by updating the display field of the connected table. 

How can I display multiple fields from one table in a connection field?

You can customize what field from a connected table shows in a connection field via the display field. 

To show multiple fields from one table in the display field, use a text formula to combine the fields into one. The text formula can then be used as the display field. This guide explains the process of setting this up: How to Show Multiple Fields in Your Connection Dropdown

What if I need many connection fields between the same two tables? I get an error message when I try to add the second connection field.

On rare occasions, you may need multiple connection fields between two tables. When you do this, you will receive a caution message before adding the second connection. You can click OK and continue adding the connection.

Please keep in mind that outside of the limited cases mentioned below, we rarely encourage double connections!

Potential cases for multiple connections include:

  • Livestock: You want to track the mother and father of a horse or other animal. In this case, you can add two connection fields from Animal back to Animal. The first connection field is called Father, the second connection field is called Mother.
  • Students: You want to track two Guardians for each Student. From the Student table, add two connection fields to the Guardian table, renaming them Guardian 1 and Guardian 2.
  • Document or Project Roles: You want to track which user from the Employees user role submits, approves, and manages each Project. From the Project table, add three connection fields to the Employees user role, renaming them Submitter, Approver, and Manager.
  • The Warehouse Manager example listed in our Complex Example article.

If you’re still unsure, please reach out to us at support@knack.com.

How do I see what type of connection I have?

If you familiarize yourself with one of your apps or are learning from one of our many demo apps, you will want to see how the connections are currently set up. 

While in the Data section of your Builder, you can click the connection in the right sidebar of your table to see the relationship type of each connection originating from or going to that table:

You can also click on the connection field to see the type:

  

How did we do?

Special Tables

Contact