Table of Contents

Working with Records

Lesley Updated by Lesley

About Records

In Knack, your data is stored in tables as records which are then composed of fields.

You can think of this like a spreadsheet, where a table is a single spreadsheet, your fields are the columns, and each record is a row in the spreadsheet.

To view and manage records in a table, click on the “Records” section of your Builder and then select the table you want to view.

Here you can add records and manage existing records in your app, however it is more common to add and manage records directly in the Live App with form views. 

For example the following are common scenarios where forms in the app would be used to add records:

  • Parents filling out a form to register children for a camp
  • Job hunters filling out a form to apply for open jobs
  • Employees filling out forms completing a project

While building your app, you can add these form views in the "pages" section of the Knack builder. Read more about using pages and forms here. 

Knack provides multiple methods for navigating, searching your records and viewing record history.

  1. Record Menu: In the record menu, you can add, import, export, batch update and delete records.
  2. Record Search Menu: In the search menu you can search by keyword, filter records, see the total number of records and limit the number of records which show per page while viewing the table.
  3. Individual Records: Using the check box, individual records can be selected specific records to update or delete. Using the two icons to the right of the checkbox, the record history can be viewed for the selected record and the record can be edited.

Searching & Filtering Records

While viewing your records in the Builder, you can search by keyword and filter your records directly in the Builder. You can easily clear your search by clicking the "X" in the search bar.

Record History

This feature is only available on Pro plans and above.

Record history allows you to access a history of every record change within our data retention window based on your account's plan.

To view a record's change history, first click on the expand icon to the left of that record:

This opens a modal popup with a form to edit that record. From there select the "Record History" tab to view changes for that record:

This display provides the version of the record every time it was changed, highlighting any specific changes from the previous record with a blue highlight.

It also notes the time of the change (in the App's timezone), the IP address, whether it was updated in the Builder or the Live App, and who changed it (if applicable).

There's no way to export the record history at this time, but you can create a version history of record changes. If you would like to keep an external backup to reference, you can also copy your record history by highlighting the data in the cells, then paste it into a spreadsheet. 

Add Records

Records can be added in a few different ways, individually from the Knack Builder, by importing a CSV file or by adding individual records from the live application.

Add Individual Records in the Knack Builder

To add a single record from the Knack builder, select the "+Add Record" button from the top menu. This will open a modal popup with a form to enter the details for the new record.

Import Records in the Builder

In the Knack builder you can add multiple records at once by using the import option. This will allow you to import a batch of records from a CSV file into an existing table.

Click on the "Import" link from the top menu to start the import process. This will open a modal popup to walk you through the importing.

Click here for more on importing records.

Add Individual Records in the Live Application

Individual records can be added directly from the live application with a form view. This is typically the most common method for adding records to an app.

Form views can be accessed and added to pages in your Live App from the “Pages” section of the Builder.

You can read more about using form views here.

Edit Records

Similar to adding records there is more than one way to update records in both the Knack Builder and the Live App.

Edit Records in the Builder

In the Builder, you can edit individual records records with a form or edit specific fields with inline editing. You can also update many records at once, by running a batch update, with a task or an import.

Individual Records

Individual records can be edited by selecting the pencil icon next to a specific record. Selecting this icon will open a form in a modal popup, where you can edit the record.

Individual Fields

When viewing the records for an table, individual fields can be edited with inline editing by selecting a specific cell.

Scheduled Tasks

Using scheduled tasks, records and connected records can be updated based on set criteria. These tasks will run on a schedule or can be run manually from the Builder.

Read more about working with scheduled tasks here.

This feature is only available on Pro plans and above.
Batch Updates

Batch updates allow you to filter records and perform an update on multiple records at one time.

To start a batch update, select the "Update" option from the top menu.

This will open the batch update settings in the toolbox to the right and will walk you through the batch update process. There you add filters to define which batch of records will be updated.

You can read more about batch updates here.

Imports

You can import records into your existing tables to update records. Select the table you wish to update then select the "Import" link from the top menu to begin the process:

When updating records with an import, it's important to choose a column in your spreadsheet that can be matched with one of your fields.

The import will use this column to find any records where the field has the same value. This will need to be a unique field (like ID, email, or name) and your spreadsheet will need to have a column for that field.

The import will then search all the existing records for the value for that column. If it finds a match, it will use that row in the spreadsheet to update that record. If it doesn't find a match, it will insert that row as a new record.

Click here for more on importing records.

Edit Records in the Live App

From the live app, you can edit individual records with edit forms and inline editing in grid views.

Form Views

Form views can edit individual records, as well as contain record rules to update records. Edit forms can be added from the pages section of the Builder.

Once a form view has been added, record rules can be added while editing that view. Record rules will allow you to set conditions, which allow you to update the form record or a connected record.

You can read more about form views here as well as record rules here.

Grid Views

Inline editing can be enabled for grid views, in the "Settings" section in the view editor. When this is enabled users will be able to select a cell on the table and edit that in a modal.

You can read more about grid views here.

Export Records

You can export your records into multiple formats from both the Builder and the Live App.

When exporting you can choose from three formats:

  • CSV: CSV stands for Comma Separated Values and is the most common format for manipulating data with a spreadsheet. CSV files can be opened with Microsoft Excel and other spreadsheet programs.
  • TXT: Text format separates values with tabs and can also be opened with Excel and other spreadsheet programs.
  • JSON: JSON is a special JavaScript format commonly used by programmers and developers. This can be a convenient way to back up the records in your database.

Export from Builder

You can export your table records at any time from the Builder. While viewing table records, select "Export" from the top menu, then select the format type.

Export from the Live App

You can export records directly from the live app by enabling exports on any views displaying multiple records (grids, lists, etc.) Exporting can be enabled from the "Settings" section of the view editor in the Builder.

You can read more about exporting records here.

Delete Records

Delete from the Builder

To quickly delete a few records, use the checkboxes to select the records you want to delete and then click the delete icon which appears above the records.

These records will be immediately removed from the application and cannot undone.

Batch Delete

To delete a large number of records at once you can use the batch delete feature. This is similar to a batch update and allows you to add filters to select which records to delete.

To start the batch delete process, select delete icon from the menu, then select the “Batch Delete” option.

This will open a new page walking you through the batch delete process.

Deleting All Records

You can remove all the records for an table by using the "Delete all records" option. To clear all records from the table, select the delete icon option from the menu, then select the “Delete all records” option.

This will open a modal popup, where you will be asked to confirm the delete. Upon confirmation every record for this table will be immediately removed from the table and this can not be undone.

If you are looking to reset auto-increment field counts, deleting a record does not reset the count. Clearing all records from the table will reset the auto-increment count to zero.

Delete from the Live App

Delete links can be added to views in the Live App, this will allow your users to delete records. These delete links can be added from the Actions tab when adding fields in the view editor.

Deleting a record does not delete any connected records from other tables. For example, if you delete a company record, any contact records that were connected to that company will still exist.

You can read more about deleting records here.

How did we do?

Importing Connections

Batch Updates

Contact