Exporting Records

This article will provide you with an explanation of how you can export records from your Knack app in both the Builder and the Live App.

This article covers the following topics:

 

Exporting your records into various formats is effortless using both the Builder and your Live App. When exporting, you have three format options:

  • 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 most 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.

 

Exporting from the Builder

You can export your table's records at any time from the Knack Builder. When viewing a table's records, select "Export" from the top menu, then select your preferred format type.

exporting1

Notes:

  • You can only export one table at a time, and all fields in the table will be exported.
  • When exporting from your Knack Builder, you can limit which records are included in the export by filtering the records beforehand.

Tip: You can learn more about filtering records in the Builder in the Manage Your Records support article.

 

Exporting from the Live App

To export records from the Live App, you can enable exporting for views that display multiple records, such as grid or list views.

To enable exporting, go to the "Options" section of the view settings in the Builder toolbox. Click on the pen icon at the top of the view and then select "Settings" to access these options.

exporting2

 

For report views, you can access the "Allow print & export options" setting by clicking on the pen icon at the top left of each individual report in a view:

exportfromliveapp

By enabling this feature, an export link will be added above the view. This is a great option if you want to provide your users with the ability to export records directly from your Live App.

exporting3When exporting from the Live App, only fields in that view will be exported. For example, if a grid has twelve different fields, all of those fields are included in the exported file.

If you choose to add an export link to a grid that displays only four fields, the export will be limited to those specific fields. This feature allows you to effectively manage the accessibility of data within your app.

When exporting from the Live App, all records currently in the view will be exported. This means that even if only the first 25 records are displayed on the first page of the view, the export will still include all 100 records in the view.

Note: Records included with the export will follow the exact order of the view, including any sorting or filters that have been applied.

 

Exporting Images and Files

Exporting an image or file field type will provide you with the URL for the file's location on our server. If you wish to batch download all these images, we would suggest using a tool like Download Manager to have it manage all the downloads for you.

Alternatively, you can utilize the Image Sniffer tool that accompanies the Download Manager extension to effortlessly locate and download all images on a page in a batch. However, please note that our testing has shown that this tool may not be as effective for files, as they tend to download in an HTML format.

 

Exporting Names and Addresses

Name and Address field types contain subfields and will be separated into multiple columns when exported. For example, a name field can contain a title, a first name, and a last name, so the export will include columns for each of these subfields.

Note: Separating subfields for name and addresses are also required when importing data into Knack.

 

Advanced Exporting

If you need advanced export options not available with export options in the Builder or Live App, we would suggest looking into services like Zapier or Make that would allow you to connect with third-party services. 

Further, we also have an API available that would allow you to build custom export functionality into your app using custom code.

Tip: You can learn more about using custom code and our API here.

 

Notes & Troubleshooting

  • Exporting paragraph text field values does include the HTML, such as <br /> for line breaks. There is no need to remove any HTML for re-importing back into Knack.

  • It is currently not possible to export all of the data in an app at once. Currently, you can only export data from one table at a time.