Learn how to create new tables, adjust table settings, and manage your tables effectively. This article covers everything from creating your first table to maintaining multiple tables as your app grows.
What you'll learn:
- Different ways to create tables
- Ways to customize table settings
- Steps for copying, managing, and deleting tables
- Tips for organizing and maintaining your tables
Creating & Managing Tables
Creating Tables
- Go to the Builder section of your app
- Create a table by clicking Add Table button at the top left panel in the Builder:
Selecting this will bring you to a page with the choice of adding the table with different options for the data source:
Blank Table: Enables you to input a new table name and then directs you back to the Builder to begin adding your fields. By default, a short text field is automatically created.
Pre-Made Table: Allows you to select one or more tables that include fields to your app. Fields can be modified anytime.
Import Excel/CSV: Select a file, then import your data from .CSV, .XLS, or .XLSX files.
Google Sheets: Sign into your Google account, then select the Google Sheet that you want to import.
Tip: To learn more about importing spreadsheets, see this article here.
Customizing Your Table
Table Settings
Access Table Settings from the left panel or table name header
- Table Name: Ensure the name of your data table to ensure clear and effective identification of your data.
- Display Field: The display field is the field that you would like to be used to identify records. This field is used throughout the application when these records are displayed in connection fields for this table.
By default, the display field will be the first field listed in the table's Fields view.
- Import spreadsheets into existing tables
- Export data into CSV, JSON, or TXT formats
- Duplicate the data and fields into an existing or new table. Note that existing data in the fields is not copied over.
-
Delete Deleting a table will remove that table entirely, including any records and wherever it may be used in your live application.
If you have any elements displaying records from that table, they will be removed as well.
Managing Your Tables
Organizing Tables
- Drag and drop to reorder tables in your list
- Use clear, consistent names. We recommend you use the plural version of your table name (e.g. "Companies" instead of "Company"). Knack automatically creates a singular version and will use the correct version when needed.
Notes:
If you create a table and name it "All Users" you will encounter an error due to the "All Users" table name being already in use. "All Users" is the default table name Knack uses when for user roles.- If you encounter this issue, please rename the table you are creating or editing.
- Table names are case-sensitive, so it is important to note that builders have the ability to add tables with the same name. For instance, a builder could add tables named "Products", "products", and "PRODUCTS".