This article will overview managing records in your Knack app.
In your Knack app, your data is stored in objects as records, where those records are composed of different fields.
You can think of this like a spreadsheet, where an object is a single spreadsheet, your fields are the columns, and each record is a row in the spreadsheet.
To view and manage records in an object, first select the object from the left menu, and then click the "Records" link.
Here you can manage and add records to your app, however most apps will add and manage records directly in the live application 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.
Navigate Your Records
Knack provides multiple methods for navigating and managing your records:
Record Sub Menu
Search by keyword
Shows current record count
Change number of records show per page
Navigate through pages
Select specific records to update or delete
Edit an individual record
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 Knack Builder
In the Knack builder you can add multiple records at once by using the import option. This will allow you to import multiple records from a CSV file into an existing object.
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
Lastly, individual records can be added directly from the live application with a form view. This is typically the most common method for adding record to an app.
From the pages section of the Knack builder, form views can be added to individual pages. You can read more about using form views here.
There are many ways to update records in both the Knack builder and the live application.
Edit Records in the Knack Builder
In the Knack 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 can be edited by selecting the edit icon next to a specific record. Selecting this edit icon will open a form in a modal popup, where you can edit the record.
When viewing the records for an object, fields can be edited with inline editing by selecting a specific cell.
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 Knack builder.
These can be added by selecting the "Tasks" link from the top menu, and then selecting “+ Add Task”.
This will open a modal popup, which will allow you to edit settings for your task.
Read more about working with tasks here.
Note: This feature is only available on Pro plans and above.
Batch updates are used to update multiple records at one time. This is a convenient alternative to making the same change to individual record one at a time.
To start a batch update, select the "Update" option from the top menu.
This will open a modal popup which will walk you through the batch update process, which will allow you to use criteria that you define to select which batch of records will be updated.
You can read more about batch updates here.
You can import records into your existing objects to update records. Select the object you with to update then select the "Import" link from the top menu to begin the process:
This will open a modal popup to begin the import process. Once there, 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 table 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 Knack 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.
Inline editing can be enabled from table views, which be added from the pages section of the Knack builder. Once a table view is added, inline editing can be enabled from the "Options" section in the view editor.
You can read more about table views here.
View Record Change History
A "Record History" feature is available on Pro plans and above, which 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 edit icon to the left of that record:
This opens a modal popup with a form to edit that record. From there select the "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 Knack Builder or the Live App, and who changed it (if applicable).
Note: 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.
You can export your records into multiple formats from both the Knack 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.
Export from Knack Builder
You can export your object records at any time from the Knack builder. While viewing object records, select "Export" from the top menu, then select the format type.
Export from the Live App
You can also export from the live app, by adding export links to any views displaying multiple records (tables, lists, etc.).
Exporting can be enabled from the "Options" section of the view editor in the Knack builder.
You can read more about exporting records here.
Delete from the Knack Builder
To quickly delete a few records, use the checkboxes to select the records you want to delete and then click the "Delete" button which appears above the records.
These records will be immediately removed from the application and cannot undone.
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" from the top menu, then select the “Batch Delete” option.
This will open a new page walking you through the batch delete process.
Clearing All Records
You can remove all the records for an object by using the "Clear all records" option. To clear all records, select the “Delete” option from the top menu, then select the “Clear all records” option.
This will open a modal popup, where you will be asked to confirm the delete. Upon confirmation every record for this object will be immediately removed from the object and this can not be undone.
Knack Tip If you are looking to reset auto-increment field counts, deleting a record does not reset the count. Clearing all records from the object 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 "Special" or “Links” tab in the view editor.
Knack Tip Deleting a record does not delete any connected records from other objects. 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.