What are Views?
Knack uses pages and views to organize the way data is viewed in your app.
A view is a visual element that works with records in your database, like a form, table, or search.
A page is used to organize your app, and can contain multiple views and link to other pages.
You access your views by clicking on the “Pages” tab in the top left, and then clicking one of your pages from the left menu. The views for that page will display in a list to the right.
Each view works with records from a single object in your database. These views are how your users will view, add, and edit the records in your database.
The following types of views are available to add to your pages:
These views work with a specific object from your database. When you add a view, you first select the type of view, then the object you want that view to work with. The view types include:
Form: insert or edit an object record. view more
Details: display a single record in a flexible layout. view more
Table: displays multiple records from an object in rows and columns. view more
List: also displays multiple records from an object, but in a more free-form display. Instead of rows and columns, a list can display fields in more flexible layouts. view more
Search: presents different options for searching object records. The results form the search can display in a table or a list. view more
Calendar: display multiple records in a graphical calendar or list. Users can navigate by day/month/week. view more
Map: display multiple records in a Google map using address fields. view more
Report: display aggregate and summary totals about records in pivot tables, charts, and graphs. view more
All the fields from the view’s object are available to use with the view. For example, if a table is displaying records from an employees object, it can use any of the employee fields as table columns. If a form is adding records to a company object, it can use any of the company fields as form inputs.
These views don’t work with a specific object but have special features:
Menu: display links to other pages. view more
RichText: display static rich text and content. view more
A login view adds user authentication to a page by displaying a login form. This view can also format a registration form for new users.
Login views can only be added by adding a login to a page. When a new page is added with a required login, this view will automatically be created to control that login.
Add a new view to a page by first selecting the page from the list on the left, and then selecting the type of view from the toolbar at the top of the page. In this example, we’re adding a Table view:
This will open a new window with a list of available objects for that page. Select an object and click the button to add the view:
Knack will always present you with the correct list of objects and views to add to your page. For example, a start page can always display views for any object, but child pages can display only certain views for a specific object.
Multiple Record Options
When adding a table, list, or other view that displays multiple records you’ll be presented with options to automatically add links to view details about or edit each record that view is displaying:
Just check off which links you want to add. Once you add the view, you’ll see child pages have been automatically added for each link you selected.
Adding Connected Views
If your app is using connections, you can add views to display connected records to any page displaying details about the parent record.
For example, in our CRM example app, you can select a table view on a Contacts details page to add a new table displaying Notes connected to that Contact.
Select the Table view on any details page and then select the connected object from the options listed:
Adding Other Views
You can hover over the “More” option on the views toolbar if you need to add a menu or rich text view:
These views aren’t directly associated with any specific object and can be added to any page.
Hover over the “Report” option to add reports to the page. Reports can be used to add pivot tables and pie/line/bar charts:
You can edit a view by simply clicking on it directly in the list of views:
This will open the view in edit mode:
Each view has various sections you can edit. Click on each section from the left menu to update those respective settings. After you’ve completed any changes, click the big Save Changes button at the bottom.
Copy and Move Views
Views can be moved or copied from one page to another. Only pages created using the same or a connected object to the view being copied or moved will be available.
For example, if you have a Company object and a Notes object 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.
Views can be moved or copied by dragging them from their original page and dropping them on a new page:
Note: Only the pages where the view can be moved or copied to will be highlighted in the Pages list.
Views can also be copied or moved from within the View editor by clicking the "gear" icon in the top-right corner:
You will then be prompted to select which page to move or copy the view to.
Delete a view by clicking the “trash can” icon:
You’ll be asked to confirm the delete.
Please note that deleting views is destructive. Any child pages that are connected to that view will also be automatically deleted.