Table of Contents
- What are Views?
- View Types
Updated by Lesley
- What are Views?
- View Types
What are Views?
Knack uses views to display the data in your app. A view is a visual element, like grids, maps, or calendars that are displayed on your Live App pages.
What do views look like in the Live App?
Grids, forms, calendars, maps, and reports are all examples of views. Views are what display your records and select other elements on your Live App pages:
How do I access views?
You can access, edit and add new views by going to the “Pages” section of your Builder.
There are different types of views available to add to your pages, each type offering different functionality.
- Record views: Work with either a single record or multiple records from a single table.
- Static views: Used for navigation or displaying static information.
- Reports: Group records to perform calculations and display results graphically.
- E-Commerce: Collect payments from Live App users.
- Logins and Registrations: Enforce permissions and enable access to your Live App.
Each view works with records from a single table in your database. These views are how your users will view, add, and edit the records in your database. Some views don’t work directly with records, those are static views.
Record views work with a specific table from your database:
When you add a view, you first select the type of view, then the table you want that view to work with. Record views can display multiple records or just one record at a time.
Single Record Views
Multiple Record Views
- Grid: Displays multiple records from a single table in rows and columns.
- List: Also displays multiple records from a table, but in a more free-form display. Instead of rows and columns, a list can display fields in more flexible layouts. A list view is good for displaying images.
- Search: Displays multiple records as results from a search. There are many search options, from simple to advanced. Choose to display search results in a grid or a list.
- Calendar: Display multiple records with a date field in a graphical calendar or list. Users can navigate by day/month/week.
- Map: Display multiple records on a map using address fields.
- Report: Display aggregate and summary totals about records in pivot tables, charts, and graphs.
Static Views: Menus and Rich Text
Static views don’t work with a specific table, but they have special features:
- Menu: Buttons or tabs that can link to pages in your Live App or to an external site.
- Rich Text: View that can display static rich text and content.
Report views are used to graphically display multiple records and perform certain types of calculations on subsets of records in your database.
Report views include:
- Bar charts: Show calculations as bars based on a single grouping.
- Pie charts: Show calculations as percentages of the whole based on a single grouping.
- Line charts: Show calculations as a plotted line based on a single grouping.
- Area charts: Fill in the area below the data points on a line chart to help visual trend lines.
- Pivot tables: Show calculations based on two groupings, rows and columns.
To learn more about the different types of reports offered and how they are used, see our article on reports.
Knack’s e-commerce functionality allows you to accept payment directly in-app, using Stripe or PayPal as your payment processor.
- Payment: Payment views can be used to facilitate payments, whether it’s the user paying themselves or an account administrator charging the user on their behalf.
Login and Registration Views
Logins and registrations are essential elements of enforcing permissions and controlling who can access different pages or views within your app.
Login views affect what other views will be available to add to a page. For example, you can only add views that show records connected to the logged-in user if the user is required to login. Logins are critical for making portals, as they allow your app to recognize who is accessing the app and therefore show a certain subset of the data. For example, a login is required to create a Client Portal that only shows each Client their own Invoice records.
Check out our guide on managing roles & permissions to learn more.
- Logins: Allows end users to enter email and password credentials to access certain pages. A user only has to log in once to have access to all login-protected pages for their specific user role.
- Registrations: Allows new users to register to access your application. You can allow immediate access for new users or build in an approval process to control who gets access.
Click here to learn more about login and registration views for your app pages.
Views can be managed from the "Pages" section of the Builder. There you can add, edit and delete views as well as manage view names and placement on pages.
To add a new view to an existing page, go to the Pages section of the Builder and select the desired page in the left menu. Then, click “Add View” from the top toolbar.
After clicking “Add View” from the top toolbar, you can select the type of view from the left toolbox.
If you select a record view, you’ll then select the records that view will work with. If you are working on a page with a login, you can choose whether you want to display records from a table connected to one of the user roles with access to the page or not.
Knack will only present you with a list of tables and views that are available to add to your page. For example, a start page can always display views for any table, but child pages can display only certain views for a specific table.
Below we’ll discuss some specific options to look out for when adding different types of views.
Single Record Views
As discussed in the previous section, some views in Knack work with only one record at a time. Single record views include:
- Forms: There are two types of forms: add forms to add new records to your database and edit forms to edit existing records in your database. Add forms can be added to any page, but edit forms can only be added to details pages.
- Details: Details views are typically located on details pages, which are child pages nested behind multiple record views like grids or maps. Details views can also be on home pages with logins restricted to a single user role, displaying the details of the logged-in user or a connected record.
When you add an “edit” column to a view, a new child page is created with an edit form. This allows the user to click “edit” in a grid view and then edit their selected record.
When you add a “details” column to a view, a new child page is created with a details page. This allows the user to drill down on specific records to see more information about that record. Details pages are often used to show other records related to the selected record. For example, you may have a Project grid displaying all active Projects. You may want to only display basic Project information on the main grid - Name, Duration, Manager, etc. Then, you can add a details link column, which creates a details page for each individual Project. On that page, you can add views to display Tasks, Invoices, or other table data related to each Project.
Multiple Record Views
Many of Knack’s views work with multiple records of a table. These views include:
When adding a multiple record view, you’ll be presented with options to add link columns to:
- Edit each record with a form
- A details page: You can display details for the view’s records or records of connected tables.
- An existing page: Link to another page in your app that works with the same source table, or the same table as the view you are creating.
Check off which links you want to add. If you select the “details” or “existing page” options, you’ll be able to specify what records or pages you want to link to. Once you add the view, you’ll see child pages have been automatically added for each link you selected.
In addition to directly adding menu views to a page. There is one special way to add menu views. Menus can be added to a page during the process of adding a form view.
When you add a new form view to your app, you have the option to put the form behind a menu. This adds a menu view and automatically generates a child page with the form view.
If you already have a menu view on that page, you’ll also have the option to add a new menu button to the existing menu view or creating a new menu view altogether.
This is useful when you want to have a form pop up in a modal window, or you'd like to display further details along with the form. It can also help you keep your pages looking streamlined and uncluttered without long forms interrupting the page.
Adding a payment view to your app is another unique process.
When editing a page that deals with a specific record, such as an edit form or details view, you will have the option to add a payment view by clicking “Add View” on the page and selecting the view type you want from the left toolbox.
However, payment views can also be generated directly from forms. For example, you have an event registration app where users have to pay to attend events. You want to direct them to submit payment during the registration process.
You will open the registration form view editor and select the section “E-Commerce” from the left toolbox. Then, click the “Add Payment View” button.
You’ll then need to select which number field from your table will be the payment field. In the case of a registration, that field might be the Grand Total. Then, you’ll choose your payment processor and finally, you’ll select whether you want to save the user’s payment info.
Logins and Registrations
A login view adds user authentication to a page by displaying a login form. If User Registration is set to Open or Approval, this can also include a registration form for new users. If enabled, users can click on the ‘Sign Up’ button below the login view to register and gain access to your app:
Login views can be added retroactively to existing pages. Add a login to a page by selecting the More Options (“...”) icon next to the page in the page menu and choosing “Require Login.”
You will then need to select what users will be able to access this page:
- Give permission to all users
- Limit permissions to specific user roles
If you select the option to limit permissions, you’ll then choose what user role(s) will have access to this page.
When a new page is created with a required login, this view will automatically be created to control that login.
You can add a registration to an existing login view by editing the login view, clicking Settings, and then selecting the registration type you want under “Can new users register to access this page?”
The options “Yes” and “Pending Approval” will create a registration view.
Click here to learn more about login and registration views for your app pages.
To edit a view, hover over the view in the Page section of the Builder. Either select the pencil icon in the top left corner of the view or click anywhere else on the view itself.
This will open the view editor in the toolbox to the left side of the Builder.
Each view has various settings sections you can edit. Click on each section from the left toolbox to update those respective settings. After you’ve completed any changes, click the “Save Changes” button at the bottom of the left toolbox:
You can learn more about adding fields to your particular view in the Views section of our Builder Guide.
Copy and Move Views
Views can be moved around a page by dragging and dropping the view around other views on the page. Select the drag cursor at the top left of the view next to the view name to drag and drop it above, below, or to the left or right of existing views on the page.
Views can be moved or copied from one page to another. To do this, hover over the view and click on the More Options (“...”) icon in the top left corner of the view and select “Copy” or “Move To.”
You can drag and drop views to other pages in your app as well.
Delete a view by hovering over the view and clicking on the trash icon in the top left corner of the view.
You’ll be asked to confirm the delete.
Views have internal names within the Builder. These internal names are helpful for identifying your views when building and maintaining your app. By default these names are set as the table being displayed or view type for menu's and rich text views that don't display specific table records.
You can hide and show view names by clicking on the tag icon in the top menu when working in the Pages section of the Builder.
All views in the page preview can be collapsed and expanded at once by clicking the expand/collapse icon in the top menu. This allows you to display the full view or choose to collapse the view to a compact version.
This is helpful when working with pages with a larger number of views. You can quickly expand all views to see the full page preview and then collapse all views to make navigating the page easier while building.
Here are our top how-to guides for using views in your live app pages:
- Show records connected to the logged-in user.
- Show records connected to the logged-in user's company or other groups.
- Keep track of edit logs with a Version Control History for Records.
- Create a Multi-Part Form
- Track When Records are Created and Updated
- Track Which User Last Updated a Record
- Create an Admin User Role to View All Records
- How to Access Private Records Without a Login
Notes & Troubleshooting
What fields can I add to my views?
Each view includes options to add table fields so that your users can view relevant information about your records on your live app pages. Forms, grids, lists, and details views, for example, allow you to add table fields from a list in the Fields section of the Settings page:
You can learn more about adding fields to different field types in the view articles here.
I can’t copy/move my view to another page
Only the pages where the view can be moved or copied to will be highlighted in the Pages list. These will be pages created using the same or a connected table to the view being copied or moved will be available. For example, if you have a Company table and a Notes table that aren't connected, a company Details view will not be able to be moved or copied to a page displaying a note Details view.
Why can’t I see all my fields in my new view?
By default, new multiple record views only display the first 6 fields from the view’s table to save space. You can add more fields to these views by editing the view. Check out the “Edit Views” section below for help with this.
Why can’t I add a calendar/map/payment view to my page?
If you don’t see the option to add a calendar, map, or payment view to your app, check the table you’re working with for the required field. Calendars need a date field, maps need an address field, and payments need a number field.